- updated the CutOut Tool such that while adding manual gaps, the cutting geometry is updated on-the-fly if the gap size or tool diameter parameters are adjusted

This commit is contained in:
Marius Stanciu 2020-03-01 19:23:06 +02:00 committed by Marius
parent 77e01825c2
commit 5b10e9faf0
2 changed files with 11 additions and 4 deletions

View File

@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
================================================= =================================================
01.03.2020
- updated the CutOut Tool such that while adding manual gaps, the cutting geometry is updated on-the-fly if the gap size or tool diameter parameters are adjusted
29.02.2020 29.02.2020
- compacted the NCC Tool UI by replacing some Radio buttons with Combo boxes due of too many elements - compacted the NCC Tool UI by replacing some Radio buttons with Combo boxes due of too many elements

View File

@ -532,8 +532,8 @@ class CutOut(FlatCAMTool):
object_geo = cutout_obj.solid_geometry.convex_hull object_geo = cutout_obj.solid_geometry.convex_hull
else: else:
object_geo = cutout_obj.solid_geometry object_geo = cutout_obj.solid_geometry
except Exception as e: except Exception as err:
log.debug("CutOut.on_freeform_cutout().geo_init() --> %s" % str(e)) log.debug("CutOut.on_freeform_cutout().geo_init() --> %s" % str(err))
else: else:
object_geo = cutout_obj.solid_geometry object_geo = cutout_obj.solid_geometry
@ -939,6 +939,9 @@ class CutOut(FlatCAMTool):
self.app.new_object('geometry', outname, geo_init) self.app.new_object('geometry', outname, geo_init)
def cutting_geo(self, pos): def cutting_geo(self, pos):
self.cutting_dia = float(self.dia.get_value())
self.cutting_gapsize = float(self.gapsize.get_value())
offset = self.cutting_dia / 2 + self.cutting_gapsize / 2 offset = self.cutting_dia / 2 + self.cutting_gapsize / 2
# cutting area definition # cutting area definition
@ -1034,7 +1037,7 @@ class CutOut(FlatCAMTool):
except TypeError: except TypeError:
return return
if self.app.grid_status() == True: if self.app.grid_status():
snap_x, snap_y = self.app.geo_editor.snap(x, y) snap_x, snap_y = self.app.geo_editor.snap(x, y)
else: else:
snap_x, snap_y = x, y snap_x, snap_y = x, y
@ -1064,7 +1067,7 @@ class CutOut(FlatCAMTool):
else: else:
radian = math.atan(dx / dy) radian = math.atan(dx / dy)
angle = radian * 180 / math.pi angle = radian * 180 / math.pi
except Exception as e: except Exception:
angle = 0 angle = 0
return angle return angle