Export DXF error in Rhino 6, X values set to negative space

Ok, this was fun (not) to track down.

I have a document that originated in Rhino 5, curves are all in positive x, y space, exported DXF cuts just fine on both my lasersaur and Rabbit laser cutters.

Customer asked for a minor change, I’m now using Rhino 6, imported the 5 doc and made the change and exported DXF and both my laser cutters rejected the file.

It turns out the Rhino 6 DXF file has all the x values in negative space. Looking at the Object Description in 6 it shows all positive x, y locations. I cut-and-pasted the description in to a text file and have attached it and the .dxf.

[edit: I can’t share the 3DM file but I can export other formats or run tests as needed.]
[edit: Installed Rhino 5 and doing A/B tests. DXF exports are correct from 5 where 6 generates DXF files with negative X values.]

Version 6 SR15 (6.15.19164.21011, 6/13/2019)

curve-details.txt (19.7 KB) curve-details.dxf (170.5 KB)

Never seen this… Can you post a sample file with maybe just a rectangle or two in “x-positive” space that exports from V6 in “x-negative” space?

When I tried to create new files in 6 that generated bad DXF I had no luck. I wonder if it’s because these files all originated in 5.

I stripped one of the files down to five circles in one layer, attached along with DXF that has objects in negative space.

dxf-neg-space.3dm (39.8 KB) dxf-neg-space.dxf (162.6 KB)

Any ideas? I prefer to work in 6 and would prefer not to restart this project from scratch.

Hello - your dxf file comes into Rhino in the correct location. Do you have any examples that do not come out wrong in your target application? Can you export the same curves from V5 using whatever export scheme (which one, btw?) you use and post that?

-Pascal

In addition to what Pascal wrote, this dxf file also comes in in positive XY space in Autodesk DWG TrueView:

Attached are the file saved in Rhino 5 format and the DXF exported from this file using Rhino 5. This DXF has no objects in the negative X space.

diff the DXF files and you’ll see that R6 exports a circle with a negative X location:

CIRCLE
  5
6F
330
1F
100
AcDbEntity
  8
cut layer two
100
AcDbCircle
 10
-203.8225676366706
 20
205.7288346622192
 30
0.0
 40
150.1013694460322
210
0.0
220
0.0
230
-1.0
  0

Please look at the content of the DXF file. If R6 can import a file with an error and not reveal that error then there are two things that need to be fixed.

Hi jet,

FWIW:

I opened the dxf in LibreCAD and the circle comes in at positive X

I tried to edit the dxf negative value -203.822… and removed the - sign
Then the circle comes in on the negative x side.
However the -1.0 further down when edited to 1.0 will again make the circle go to positive X

so the sign change is negated by that -1.0

image

I have no knowledge of DXF formatting, but some googeling reveals that the 230 code is indicating the Z-value of the extrusion vector. Again I have no clue what an extrusion vector is doing for a circle.

However if in Rhino I flip the circle, the export comes out with a positive value.

Long story short it seems the direction of the circle is causing the negative values.

Your software is interpreting the circle different from other software and it seems it’s not following DXF standards.

To fix it you could try to make sure your circles are all counterclockwise.
This is your file showing the large circle is clockwise as opposed to the small ones.

-Willem

EDIT: a test with v5 dxf exports shows this sign change in not happening in V5 for ‘flipped’ curves. @pascal it seems indeed introduced in V6 and I can imagine this will affect more interpreters not parsing circles with extrusion vector values taken into account.

Hi Willem - yep - there is a setting in V6 for arc normals -

@jet, fyi… that might be what you need.

-Pascal

1 Like

Why should I - a designer and engineer - care about which direction the circle is drawn? Why would I even want to know that? I’m working on a g-code generator for laser cutters and “which way the circle is drawn” is not an issue when I’m cutting the circle. “Which is the fastest way to cut the circle?” is the question I want to answe.r

Thanks, Pascal, that fixed it. Looking at Rhino 5, it seems to have been the default case. Our user instructions from Rhino 5 don’t involve making that change to use positive arc normals.

Also, can you go in to any detail as to why this option even exists? I’f I’m working on a 2d object, wouldn’t normals go in the +Z direction by default? (This is what I get for napping during maths classes as an undergrad. :slight_smile:

If you don’t care about kerf compensation, then its probably not relevant.

1 Like

Oh, right, there are digifab tools other than laser cutters. :slight_smile:

I’ll do some tests with our pool of cutters and see if any recognize the direction of a cut.