A mess when exporting polylines to DWG

Hi all -

This problem has been around for a while… Any chance it can be addressed? The issue is that if I try to export polylines from Rhino to DWG, they get corrupted.

Here is what I start with:

And here is what I end up with:

My settings are plain vanilla. The only way this works is if I explode everything first, which is a pain, as I have to rebuild the polylines in Rhino.

Cheers,

Tom

Can you post the file? That doesn’t look like a typical polyline to me.

Sure thing - here it is.

ForExport_Forum.3dm (1.7 MB)

And just in case:

And just so people understand how I got these curves: I did a section through my model, using the “Section” command.

Cheers

The section you took through your 3D model resulted in various curves and polycurves - they are not polylines. When you export them, they are indeed turned into polylines due to your settings here:

image

If I export your curves with the same settings you have posted above, and then re-import them into Rhino, I get a very close approximation of your original - of course, all the smooth curves have been converted into segmented polylines, as per the export settings.

ExportTest-07-12-22.3dm (4.6 MB)
test.dwg (40.5 KB)

So the fault seems to be in AutoCAD’s import perhaps. I don’t know what version of ACAD you are using, but since you are exporting from a LEFT viewport in Rhino, this can confuse versions like LT which are strictly 2D.

I wonder if you can try the following:
Use RemapCPlane on your section curves, remap them from Left to Top. Then project the result to the Top CPlane. Then re-export the result. Does that work any better?

Hi Helvetosaur -

I appreciate you looking into this.

The main issue I have is that this used to work just fine and no longer does. I wish I could say when this started happening - from memory it was before version 7, but I can’t swear to that.

I don’t think that the viewport selection makes any difference, since the setting forces the curves to be projected onto the CPlane, and are exported as a 2D drawing. We’ve been doing this for a decade+, and that was never an issue.

And on my end, if I re-import the curves into Rhino, I get exactly the same result as in Autocad, which tells me this isn’t an Autocad issue, as much as that would have been satisfying…

Rhino is doing something to the curves on the way out.

There are the re-imported curves in Rhino:

PS: We use the latest version of Autocad LT (version 2023). We’ve been using LT for years, never been an issue with importing DWGs from Rhino until this issue.

Dunno, when I re-import the dwg I posted above - which was exported from your sample file in Rhino Rhino using your settings shown in the screenshot, I get this:

Which looks correct to me and there doesn’t appear to be anything missing.

Interesting though, you are showing it in the XY plane and somewhere near the origin (you can see the grid and a point in your image) but the curves were not on the XY plane when exported, they were drawn in the “Left” ortho viewport.

How strange that we get different results when re-importing…

Hi Tom -

Are you importing Mitch’s DWG file?

At any rate:

There is no “LDP_Metric” export scheme in vanilla Rhino.

On my end, round-tripping a DWG that’s produced with the Default scheme worked fine.
-wim

Sorry for the very late response to your helpful post.

I eventually marched through all the settings and found that the culprit was the “split curve at kinks” that messed everything up. If I unselect it, my exports work just fine. Smells like a bug to me…

Happy New Year, everyone!

T.

See Bobis latest post:

I fully agree with him … not so sure about exporting polylines as splines, but for the rest… don´t use tesselation or splitting at kinks…

1 Like

Exporting Polylines as Splines turned out to be the most appropriate way to all the CNC laser shops that used my DWG and DXF drawings over the years. Some of their software was unable to properly work with Polylines saved as Polylines, however, Splines worked 100% of the time.

Hi @piroshki ,
did you tried CopyPasting from Rhino WIP to Autocad?
I tested your file with BricsCAD V23.1.07 and look working fine.

I find copy paste to DWG a great new feature added in Rhino 8,
please have a look here too
Copy/paste geometry between instances of Rhino and Autocad
We love all Rhino but we have to deal with DWGs, this ease the pain!