Request: Better export to DWG

Hi all,

In these days of adaptive algorithms, I am a little frustrated by the settings and controls for the export to DWG command. I’ve been using the command for more than a decade, and still, I’m not always happy with the ways curves are output/segmented.

It could be that I have never found the correct settings across all my use cases, but I feel like there should be some form of object awareness so the settings can adapt (to scale, to object complexity, to type, etc.). Maybe something close to compression in a JPG where there is the notion of quality? Perhaps some feedback, like the rebuildCrv command that shows the maximum deviation? Perhaps one could call it “smart segmentation”? The current approach feels very “brute force”…

I’m sure you have all thought about this far more than I have - perhaps there is no good solution - but I figured I would put this out there!

Thanks for the continued great work on Rhino!



It sounds like you are having issues with Degree 3 and higher NURBS curves being converted to segmented polylines on export.
That’s because the DWG/DXF file format has no provision for NURBS.
Your Rhino curves need to be converted before exporting to something that dumb DWG can handle more accurately.

If I’ve guessed correctly, this is a problem we usually see with export for CNC.

The work-flow is to Convert your curves into chains of arcs that DWG can manage.
See if this is instructive:

Hi John - thanks for the quick reply. I am in fact doing some CNC work these days, but tesselation hasn’t caused any problems for me yet - although I appreciate the pointers on the link you sent.

It just feels like the tesselation used by default in Rhino is a little dumb - and perhaps you are on to something with having an option for rhino to build the polylines out of lines and arcs, rather than just line segments… I work on things that are both very large (50 meters), and quite small (down to 5 cm), but often in the same drawing. I just find the current solution rather coarse…

I am sure that tesselation has been long “solved” (its been around for a very long time), so perhaps there is nothing to do… To me it just feels like it should be smarter, whatever that means! :slight_smile:



The real fix is for you to quit using a limited file format like DWG/DXF for CAM.

Nearly all non-hobby level CAM tools will open IGES files. IGES does support Rhino NURBS curves, so the conversion to G-Code is built in.

Can you use IGES instead?

Ha - I wish. Much of our work still happens in 2D (remember paper drawings?), so I spend a lot of time exporting sections and lines from Rhino to AutoCAD, and then working on the drawings in AutoCAD. Therefore the quality of the line that is exported is rather important, or else the drawings can get out of hand. Why not do the 2D in Rhino? That’s a whole other topic, but I find working on line drawings in Rhino painful, and like the separation between the model and its representation… most of the time.

Use the Rhino Convert command.
Use these command option settings:
Tolerance=0.01mm or 0.002"

The tolerance controls how far the arcs will pull away from your NURBS curves. Your machining process and project will determine how much is OK. The distance is in current model units.

Then when you Export to DWG/DXF, use the “CAM Imperial” export scheme for inches and “CAM Metric” for millimeters. Both of these export simple geometry as lines and circles.

Always check your DXF file by opening it in Rhino before you send it for cutting to make sure it looks good.

Thanks John - interesting approach, but the last thing I need is to add a step in the export procedure. It is cumbersome enough as it is. Why can’t this tesselation scheme make its way as an option into the DWG export command?

In addition to what @John_Brock suggests, if you want to stay strictly as polylines:

Given this:

You can make some provisions for that in Convert.

  • Output=Lines
  • AngleTolerance=<> Use some minimum kink angle you can tolerate, perhaps somewhere 2°-5°
  • Tolerance=<>This is a scale dependent setting, depending on what/how you’re manufacturing.
  • MinLength=<> set some small value here that keeps Rhino from producing too many micro segments in sharp areas - again, it’s scale/manufacturing process dependent
  • MaxLength=<> set some large value here so that when there is a large radius curve, it still gets a number of segments

If you play with combinations of those, you can eventually end up with a more or less universal setting for your work. You could also create macros with different values for Coarse, Medium and Fine…

I use these setting to export to Fusion. Don’t remember getting segmentation of splines with high Degree.

Seem to remember Split at Kinks made a big difference.

Thanks - this is what I do now, and I’ve been doing for more than a decade. I guess I was hoping there was some algorithmic way for these settings to change based on the geometry, but perhaps this is just wishful thinking…

Splines have been notoriously painful to use in AutoCAD… although they have made some progress in the past few years so perhaps I should give them another try…

I guess how well this works will depend a bit on the program opening the DXF. Here’s a quick test exporting to Fusion with a couple of splines.