--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
--
Hi,
i just checked in the Code again, this is how it understood it up to now :
In the configuration file 3 variables are set to define the Units.
self.metric (This should be defined during the Import? Yes it will be overwritten later, so no effect in the config at all.)
self.tool_units and
self.tool_units_metric
After that the Units are read in the DXF file:
It will be searched for : $MEASUREMENT or $INSUNITS if None of both is found the Standard which is mm is used.
This will be saved in the global variable: g.config.metric where 0 is Inch and 1 is mm. Which means the value in the configuration file will be overwritten. And will be mm if Nothing is set without taking into care the variable in the config file.
After that the values read are used here to set it during Export:
For the configuration window GUI the value of self.tool_unit is used again.
I’m not really sure how this should work at all. Too many different variables used and then overwritten. This makes me confused …
Maybe you understand it better.
Regards
Christian
New Section of code:for line in range(len(str) - 2):if str[line].startswith("$MEASUREMENT"):metric = int(str[line + 2].strip())break# Default drawing units for AutoCAD DesignCenter blocks:# 0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters;# 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;# 9 = Mils (thous); 10 = Yards; 11 = Angstroms; 12 = Nanometers;# 13 = Microns; 14 = Decimeters; 15 = Decameters;# 16 = Hectometers; 17 = Gigameters; 18 = Astronomical units;# 19 = Light years; 20 = Parsecs
if str[line].startswith("$MEASUREMENT"):if int(str[line + 2].strip()) == 1:metric = 0elif int(str[line + 2].strip()) == 4:metric = 1break
Hi Fuyun,
just reviewed your changes and added them with one additional „improvement“ to the develop branch.
Refer to: https://sourceforge.net/p/dxf2gcode/sourcecode/ci/develop/tree/
Thanks for you support
Old Section of code in Get_Unit(self, str)New Section of code:for line in range(len(str) - 2):if str[line].startswith("$MEASUREMENT"):metric = int(str[line + 2].strip())break# Default drawing units for AutoCAD DesignCenter blocks:# 0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters;# 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches;# 9 = Mils (thous); 10 = Yards; 11 = Angstroms; 12 = Nanometers;# 13 = Microns; 14 = Decimeters; 15 = Decameters;# 16 = Hectometers; 17 = Gigameters; 18 = Astronomical units;# 19 = Light years; 20 = Parsecsfor line in range(len(str) - 2):if str[line].startswith("$MEASUREMENT"):if int(str[line + 2].strip()) == 1:metric = 0elif int(str[line + 2].strip()) == 4:metric = 1break
for line in range(len(str) - 2):if str[line].startswith("$MEASUREMENT"):metric = int(str[line + 2].strip())break
To unsubscribe, send mail to dxf2gc...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gc...@googlegroups.com.
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.
for line in range(len(str) - 2):if str[line].startswith("$MEASUREMENT"):
tmp_metric = int(str[line + 2].strip())if 0 <= tmp_metric <= 1:metric = tmp_metricbreak
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.