Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
DXF file export in wrong units
philip_boddington
Member Posts: 1 ✭✭
I always model in metric mm's. Over the last 5 years I have successfully exported dxf files for laser cutting which have been cut to the correct dimensions.
However I am now trying to send cutting drawings in dxf format to a different cutter and their software is telling me that my dxf files dimensions are incorrect. If my model has a dimension of 25.4 mm their software is reading this via my dxf file as 1 - ie the dimension is still correct but in the dxf file it has been converted to inches.
I read the ascii text in the dxf file and indeed the units are stated by onshape to be in inches which is incorrect.
Has something changed with how Onshape exports dxf files recently?
Am I write in thinking that Onshape is converting my model dimensions from mm to inches when I export to dxf despite my drawings being in mm?
I saw the post about a workaround involving changing my model dimensions to inches and then saving to dxf. I don't see how this helps as my dxf file will still be in inches.
I would appreciate any help with this. Thanks.
However I am now trying to send cutting drawings in dxf format to a different cutter and their software is telling me that my dxf files dimensions are incorrect. If my model has a dimension of 25.4 mm their software is reading this via my dxf file as 1 - ie the dimension is still correct but in the dxf file it has been converted to inches.
I read the ascii text in the dxf file and indeed the units are stated by onshape to be in inches which is incorrect.
Has something changed with how Onshape exports dxf files recently?
Am I write in thinking that Onshape is converting my model dimensions from mm to inches when I export to dxf despite my drawings being in mm?
I saw the post about a workaround involving changing my model dimensions to inches and then saving to dxf. I don't see how this helps as my dxf file will still be in inches.
I would appreciate any help with this. Thanks.
0
Answers
The exported dxf file is in the document, you can look at it to see wheter it is different compared to your files....
https://cad.onshape.com/documents/bcecbaabf7c1467ae8ee16d3/w/b4fc9e17f8e71eecf15143eb/e/24f3592a28c86d3ca5c1e354
Problem is Onshape will not care to correct the unit information in the header of the exported file. YES there is units specified in a .dxf file - this is to instruct the importing application.
This is to be considered a bug IMO
I have also had several issues of suppliers using the incorrect units because onshape does not change the units, regardless the header is always specifying inches unless you edit the file manually in notepad.
Not all suppliers are cluey enough to check with units and not all software make apparent selecting the units to interpret as.
Automated quoting software even worse and worse again these are often run by not very knowledgeable staff.
Tell your supplier to import your dxf file as metric/mm and tell Onshape to fix their dxf exporter.
Onshape Dev please look into correctly setting "insunits" parameter in the file. This appears to be the units that the importing application will default to for the file.
Drawing:
https://cad.onshape.com/documents/f3b03c15b5a38d98937576aa/w/03e00bbfa4b98c92668f399b/e/bdf18c2388397934058580f1
Here is the pertinent section of the file.
```
onshape created in mm, export to dxf, import dxf to kicad, appears as if onshape had been in inches.
kicad has no units override unless no units are specified.
the scaling ratio from inches back to mm borders on irrational: 0.039370078740157...
leading to unavoidable truncation errors in kicad.
This makes the file unusable.
Export the file.
Open it with a text editor.
Use Find (Ctrl+F) to search for $INSUNITS
You should see:
Change that 1 (which means [inches] ) to a 4 for [mm].
Or a 0 for [no set unit].
Go forth .. but OnShape should fix this.
I believe that is just what was intended, and it solves the main issue people have with DXF export.
our CAM software is opening up .dxf files generated in OnShape and scaling them down because the units are set to inches, while our CAM system is operating in metric units. Our operators/programmers can set the units to inches in our CAM software and open DXF files generated in OnShape at the correct scale, however all of the measurements for the panels on our BOM and in our models are in metric.
That's strange and not what I've seen. Something that says it is 30 units long could be interpreted as 30 inches or 30 millimeters long. Else, it is not wrong units, but scaled, and that might just be a different issue.