- added total travel distance for CNCJob object created from Excellon Object in the CNCJob Selected tab

This commit is contained in:
Marius Stanciu
2019-02-14 01:21:24 +02:00
committed by Marius S
parent e091fd232d
commit 3a05ebaffb
4 changed files with 42 additions and 2 deletions

View File

@@ -4946,6 +4946,8 @@ class CNCjob(Geometry):
measured_distance += abs(distance_euclidian(self.oldx, self.oldy, 0, 0))
log.debug("The total travel distance including travel to end position is: %s" %
str(measured_distance) + '\n')
self.travel_distance = measured_distance
self.gcode = gcode
return 'OK'
@@ -5558,7 +5560,7 @@ class CNCjob(Geometry):
return "fail"
gobj = self.codes_split(line)
print(gobj)
## Units
if 'G' in gobj and (gobj['G'] == 20.0 or gobj['G'] == 21.0):
self.units = {20.0: "IN", 21.0: "MM"}[gobj['G']]