unsolved Measurement Units always defaulting to Millimeters

eventhorizons

Aktiver Benutzer
Member
Landesflagge
At launch, dxf2gcode has the measurement units ("Options --> Measurement Units") greyed out and cannot be changed or viewed.
When I load a saved project, the units are set to Millimeters, regardless of what they were set to when I saved the project. Then, changing the units to Inches causes all the values to be converted.

Example: I load a DXF and set the units to English. The "Z Safety Margin" is set to 0.1". Save the project. Close dxf2gcode. Launch dxf2gcode. Load the saved project. "Z Safety Margin" now shows 0.1mm. Changing units to Inches then changes the Z Safety Margin to 0.0039".

Ideally, I would like to see the default Measurement Units be part of the software config ("Options --> Configuration) and also saved as part of the project.

(I know...I should just convert to metric!! It is a better system, but I'm old and it's hard for me to think intuitively in metric. Plus all my machines and tooling are in English units. Don't even get me started on fractional units!)

P.S. I am running dxf2gcode built from the source code on github Sourceforge (version number does not appear to be set) on Rocky 9 (RHEL) Gnome desktop.
 
Zuletzt bearbeitet:
Can you attach an example DXF file where you observed this issue? Thanks in advance
Christian
Here is the DXF that I have been using to test and learn dxf2gcode.

I have been using DXF files since the dawn of time (mid-80's) and they were always unitless. I only recently learned that a units feature had been added but my AutoCAD 2000i does not include them. I remembered this while writing this reply.

I'm assuming dxf2gcode does implement that parameter and without it is simply defaulting to metric?

When saving a "project" (.d2g file) perhaps that setting could be put into the file?
 

Anhänge

  • SwitchPlate.dxf
    17,1 KB · Aufrufe: 0
I think you can set them also in the Configuration file, see attached picture. Did you try that also? But i think it might be overwriten by the value set in the DXF (if any).
2023-03-26 22_07_57-DXF2GCODE.png
 
I think you can set them also in the Configuration file, see attached picture. Did you try that also? But i think it might be overwriten by the value set in the DXF (if any).
I do have that option set to Inches.

I just now peeked under the hood of the "D2G" project file and discovered that it simply references the original DXF file. Now I know that I can't move or delete the DXF!
The D2G file also contains (as expected) the layer information, such as speed, retract and safe margin.
There is a parameter "d2g.scale" that is set to "1.0" but nothing else that is close.

My test DXF file did not contain the "$INSUNITS" parameter, which I already knew it wouldn't. I am in the habit of specifying AutoCAD R12 DXF to export from AutoCAD because of compatibility problems I have had in the past and the units feature was not introduced until AutoCAD 2000, which is what I have.

To test, I exported using AutoCAD 2000 DXF and that file does contain $INSUNITS with a value of "1" (Inches). dxf2gcode recognized this and had the correct settings when I opened the file.

So I guess the lesson here is that if the DXF file specifies the units, then dxf2gcode will make use of that but if it is not specified then the default is millimeters.

What I would like to see is the ability to set the default units in dxf2gcode for when the DXF file does not specify the units. Perhaps that setting that you referenced could be used to do that?
 
I found that the program defaults to metric and only changes to English if the DXF file contains the [imath]INSUNITS[/imath] parameter. It does not seem to save any change back to the DXF.

One can manually add [imath]INSUNITS[/imath] to the DXF file and it selects the correct units.
I would like to see a feature that changes the default units in dxf2gcode when the units are not specified and possibly also a feature to save that option back to the DXF file. (That could present some other issues.)

In the meantime, I am trying to add BOSS5 support for my ancient Bridgeport mill. I have made some progress, but life keeps intervening and my python skills are weak at best!
 

Benutzer welche diesen Thread betrachten (Mitglieder: 0, Gäste: 1)

Wer hat diesen Thread gelesen

Zurück
Oben