- fixed bug in ToolCutout where creating a cutout object geometry from another external isolation geometry failed

- fixed bug in cncjob TclCommand where the gcode could not be correctly generated due of missing bounds params in obj.options dict
- fixed a hardcoded tolerance in FlatCAMGeometry.generatecncjob() and in FlatCAMGeometry.mtool_gen_cncjob() to use the parameter from Preferences
This commit is contained in:
Marius Stanciu
2019-06-07 23:14:00 +03:00
parent 2974389404
commit a5ffe475dd
5 changed files with 39 additions and 10 deletions

View File

@@ -165,6 +165,11 @@ class TclCommandGeoCutout(TclCommandSignaled):
# Get min and max data for each object as we just cut rectangles across X or Y
xmin, ymin, xmax, ymax = cutout_obj.bounds()
cutout_obj.options['xmin'] = xmin
cutout_obj.options['ymin'] = ymin
cutout_obj.options['xmax'] = xmax
cutout_obj.options['ymax'] = ymax
px = 0.5 * (xmin + xmax) + margin
py = 0.5 * (ymin + ymax) + margin
lenghtx = (xmax - xmin) + (margin * 2)
@@ -260,6 +265,11 @@ class TclCommandGeoCutout(TclCommandSignaled):
px + gapsize,
ymax + gapsize)
geo_obj.solid_geometry = deepcopy(geo)
geo_obj.options['xmin'] = cutout_obj.options['xmin']
geo_obj.options['ymin'] = cutout_obj.options['ymin']
geo_obj.options['xmax'] = cutout_obj.options['xmax']
geo_obj.options['ymax'] = cutout_obj.options['ymax']
app_obj.disable_plots(objects=[cutout_obj])
app_obj.inform.emit("[success] Any-form Cutout operation finished.")
@@ -317,6 +327,10 @@ class TclCommandGeoCutout(TclCommandSignaled):
px + gapsize,
ymax + gapsize)
geo_obj.solid_geometry = deepcopy(geo)
geo_obj.options['xmin'] = cutout_obj.options['xmin']
geo_obj.options['ymin'] = cutout_obj.options['ymin']
geo_obj.options['xmax'] = cutout_obj.options['xmax']
geo_obj.options['ymax'] = cutout_obj.options['ymax']
app_obj.inform.emit("[success] Any-form Cutout operation finished.")
outname = cutout_obj.options["name"] + "_cutout"