.dwg export curves are reversed

Exporting a tool path in 3D .dwg from plan view, parallel projection, lines only, outputs with some of the curves in reversed orientation. I remember this was solved at one point in the past but I can’t find the link right now. I believe it ended up having something to do with curves being left to right or right to left. Anyone remember what the annoying cause of this behavior is and how to correct it?

Lots of good info here…are you using SU 2019 for the export?

1 Like

Yes, that was the conversation I was looking for, thanks. @IanT for the win! Got to dig deeper into this, I’m using 18 for now, I’ll update when I can spare the time. Is there documentation of the 19 build being better?

No documentation(that I am aware of)…just comments that 2019 exporting to dwg has been improved.

1 Like

I installed SU 2019 and did some testing & still see some oddities, but it se ems to be better.
Re-created your parts to illustrate at least one odd behavior.(holes move off part when flipped copies are present) this occurs in my CAD software but not in SheetCam. see images & file below
Note: I exported to .DXF not .DWG

V7Arctest_SketchupForum_02_16_2019.skp (158.3 KB)

EDIT: .DXF File Version 2007
Arctest_SketchupForum_02_16_2019_V2007.dxf (376.9 KB)

1 Like

I don’t see any errors in DWG TrueView 2019. Exported to DXF from SU 2019 in AutoCad 14 and AutoCad 2018 formats. Sounds like bugs at the receiving application end.

@Anssi, in all cases I have seen, the issue doesn’t occur at all in cad viewer/softwares. The export looks fine when you open it up there.

The problem arises when you put that “seemingly fine” file into CAM. The issue then pops up with the Arcs flipping…

I uploaded the .dxf (V2007) generated by SU 2019 (see above)

I see you got a pretty good result there. Unfortunately I tried SU 19 last week with a newer CAM software for a brand new 5 axis machine we have. I got the same Arc flipping issue as before in my tests. (DXF in that case).

Gkernan’s extension produces good results for me at least consistently. I am still getting used to implementing it to the new software though.

I tried a simpler file with only an arc and its mirror image and looked through the DXF. Nothing abnormal there (predictably, flipped entities get a negative extrusion direction, but it is perfectly legit). It seems that the CAM software used has a bug that prevents it from sorting this out correctly.
Has anyone tested by creating mirrored arcs in their CAD software? Does welding the paths help?

“I see you got a pretty good result there.”
For this particular file I did, but that is not always the case…and to be fair I need to give SU 2019 more time to see if this is resolved or even if it is on SU side of things.

Maybe not, but what I find most interesting is that users reporting on the forum are using different CAM software for their individual cases.

Could the different CAM softwares that are being used have the same bug? The common factors are all the files come from SketchUp using the SketchUp exporter. That’s how I see it in my experience.

Great point!

An extract from the Autodesk DXF reference manual.
When the SketchUp entity is mirrored, the SketchUp exporter uses the two highlighted OPTIONAL group codes to confer the fact instead of reverse engineering the geometry and regenerating the arcs by using only positive values. the CNC apps seem to ignore this transformation.

Edit: I made a test, with an arc and its mirrored copy and exported to DXF:
I then opened the DXF and deleted the rows with the 210,220 and 230 group code values, and the result was this:


I agree. In this case the exported sketchup file looks fine when opened with iCad .dwg viewer. But the curves reverse when imported into Vectorworks. I’m still trying to develop a functioning workflow for this. One trick is exporting directly to the shopbot cad software as a 1:1 “printed” sheet from layout by setting the paper size to 8’x4’ (real world dimensions for a sheet of plywood).

I’m curious to look into the extension and also to experiment with welding the lines before exporting, when I’m back at the computer.

What happens if you explode the viewport in LayOut and export a DXF or DWG from there?

Good question. Maybe this could be a pathway for getting the file correctly into Vectorworks. I’ll try on Monday. Still wish there was a functioning direct from sketchup option.

I suggested welding in an earlier post. No, that doesn’t work, as a welded curve becomes a segmented polyline when exported.

Ahhhh. Yes I had seen your suggestion and was curious. Thanks for the update. Interesting info you uncovered about how sketchup stores the reversed or flipped info and the x y data on separate lines. I wonder if there is a way to get Vecroworks to honor those optional data lines instead of throwing them out. Hmmmm. Is sketchup organizing the data this way instead of rebuilding the arc to be able to keep reversed instances of components linked within a sketchup model? Interesting.

@Charlie_v @endlessfix

Would it be possible for you to try this skp and tell me if it the dxf results are more in line with what you are looking for? I have an older script that does some modification to arcs. I have applied the script to your file and I am curious if it will fix your issue. I don’t have the CNC software.

V7Arctest_rubyFIX.skp (190.2 KB)

If it works, I would be happy to provide it to the forum :slight_smile:

Crossing fingers