- in drillcncjob Tcl command added the usage of RTree path optimization and made it the default choice
This commit is contained in:
@@ -15,6 +15,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- fixed not adding the feedrate code in `drillcncjob` Tcl command
|
- fixed not adding the feedrate code in `drillcncjob` Tcl command
|
||||||
- fixed crash when trying to do a `select all` and there are app Scripts present
|
- fixed crash when trying to do a `select all` and there are app Scripts present
|
||||||
- updated the `drillcncjob` Tcl command to make a script exit in case of an error
|
- updated the `drillcncjob` Tcl command to make a script exit in case of an error
|
||||||
|
- in `drillcncjob` Tcl command added the usage of `RTree` path optimization and made it the default choice
|
||||||
|
|
||||||
29.01.2022
|
29.01.2022
|
||||||
|
|
||||||
|
|||||||
@@ -4353,9 +4353,7 @@ class CNCjob(Geometry):
|
|||||||
altPoints.append((point.coords.xy[0][0], point.coords.xy[1][0]))
|
altPoints.append((point.coords.xy[0][0], point.coords.xy[1][0]))
|
||||||
optimized_path = self.optimized_travelling_salesman(altPoints)
|
optimized_path = self.optimized_travelling_salesman(altPoints)
|
||||||
elif used_excellon_optimization_type == 'R':
|
elif used_excellon_optimization_type == 'R':
|
||||||
for point in points[tool]:
|
optimized_path = self.exc_optimized_rtree(points[tool])
|
||||||
altPoints.append((point.coords.xy[0][0], point.coords.xy[1][0]))
|
|
||||||
optimized_path = self.exc_optimized_rtree(altPoints)
|
|
||||||
if optimized_path == 'fail':
|
if optimized_path == 'fail':
|
||||||
return 'fail'
|
return 'fail'
|
||||||
else:
|
else:
|
||||||
@@ -4426,6 +4424,9 @@ class CNCjob(Geometry):
|
|||||||
if used_excellon_optimization_type == 'T':
|
if used_excellon_optimization_type == 'T':
|
||||||
locx = point[0]
|
locx = point[0]
|
||||||
locy = point[1]
|
locy = point[1]
|
||||||
|
elif used_excellon_optimization_type == 'R':
|
||||||
|
locx = point[0][0]
|
||||||
|
locy = point[0][1]
|
||||||
else:
|
else:
|
||||||
locx = locations[point][0]
|
locx = locations[point][0]
|
||||||
locy = locations[point][1]
|
locy = locations[point][1]
|
||||||
|
|||||||
@@ -270,7 +270,8 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
|||||||
"in format (x, y) - no spaces allowed. But always two comma separated values.")
|
"in format (x, y) - no spaces allowed. But always two comma separated values.")
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
opt_type = args["opt_type"] if "opt_type" in args and args["opt_type"] else 'B'
|
# Path optimization
|
||||||
|
opt_type = args["opt_type"] if "opt_type" in args and args["opt_type"] else 'R'
|
||||||
|
|
||||||
# ##########################################################################################
|
# ##########################################################################################
|
||||||
# ################# Set parameters #########################################################
|
# ################# Set parameters #########################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user