- fixed Tcl Command CncJob

- fixed crash due of Properties Tool trying to have a convex hull area on FlatCAMCNCJob objects which is not possible due of their nature
- modified Tcl Command SubtractRectangle
- fixed and modernized the Tcl Command Scale to be able to scale on X axis or on Y axis or on both and having as scale reference either the (0, 0) point or the minimum point of the bounding box or the center of the bounding box.
- fixed and modernized the Tcl Command Skew
This commit is contained in:
Marius Stanciu
2019-08-26 00:40:35 +03:00
committed by Marius
parent 65ab17e308
commit ba1e0bc94b
11 changed files with 133 additions and 50 deletions

View File

@@ -6001,7 +6001,10 @@ class CNCjob(Geometry):
flat_geometry = self.flatten(temp_solid_geometry, pathonly=True)
log.debug("%d paths" % len(flat_geometry))
self.tooldia = float(tooldia) if tooldia else None
try:
self.tooldia = float(tooldia) if tooldia else None
except ValueError:
self.tooldia = [float(el) for el in tooldia.split(',') if el != ''] if tooldia else None
self.z_cut = float(z_cut) if z_cut else None
self.z_move = float(z_move) if z_move else None
@@ -6669,6 +6672,10 @@ class CNCjob(Geometry):
if tooldia is None:
tooldia = self.tooldia
# this should be unlikely unless when upstream the tooldia is a tuple made by one dia and a comma like (2.4,)
if isinstance(tooldia, list):
tooldia = tooldia[0] if tooldia[0] is not None else self.tooldia
if tooldia == 0:
for geo in gcode_parsed:
if kind == 'all':
@@ -7042,7 +7049,10 @@ class CNCjob(Geometry):
bounds_coords = bounds_rec(self.solid_geometry)
else:
minx = Inf
miny = Inf
maxx = -Inf
maxy = -Inf
for k, v in self.cnc_tools.items():
minx = Inf
miny = Inf