You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with GCode files which specify measurements in inches to 6 decimal places (and yes, this level of precision can matter on professional tools). The default linuxcnc dialect in pygcode appears to be parsing my files without difficulty. However, I noticed that all numbers were being rounded to 3 decimal places. The rounding is performed on line 33 of https://github.com/fragmuffin/pygcode/blob/master/src/pygcode/dialects/linuxcnc.py:
To proceed with my current project, I will simply modify my local copy of pygcode to round to 6 decimal places. However, I wonder whether I should register another dialect instead, perhaps I could call it "precise". The dialects section of pygcode appears to be incomplete. I'd like to start a discussion about what the author's intentions are for pygcode dialects, and how best to use them.
The text was updated successfully, but these errors were encountered:
Thanks for this useful project!
I am working with GCode files which specify measurements in inches to 6 decimal places (and yes, this level of precision can matter on professional tools). The default linuxcnc dialect in pygcode appears to be parsing my files without difficulty. However, I noticed that all numbers were being rounded to 3 decimal places. The rounding is performed on line 33 of https://github.com/fragmuffin/pygcode/blob/master/src/pygcode/dialects/linuxcnc.py:
CLEAN_FLOAT = lambda v: "{0:g}".format(round(v, 3))
To proceed with my current project, I will simply modify my local copy of pygcode to round to 6 decimal places. However, I wonder whether I should register another dialect instead, perhaps I could call it "precise". The dialects section of pygcode appears to be incomplete. I'd like to start a discussion about what the author's intentions are for pygcode dialects, and how best to use them.
The text was updated successfully, but these errors were encountered: