- in Tool Cutout fixed manual adding of gaps with thin gaps and plotting

- in Tool Cutout, when using fix gaps made sure that this feature is not activated if the value is zero
This commit is contained in:
Marius Stanciu 2020-08-27 03:29:52 +03:00 committed by Marius
parent c99b20df7b
commit 7eeda0347f
2 changed files with 13 additions and 6 deletions

View File

@ -11,6 +11,8 @@ CHANGELOG for FlatCAM beta
- fixed the Tcl commands AddCircle, AddPolygon, AddPolyline and AddRectangle to have stored bounds therefore making them movable/selectable on canvas
- in Tool Cutout, when using the Thin Gaps feature, the resulting geometry loose the extra color by toggling tool plot in Geometry UI Tools Table- fixed
- in Tool Cutout fixed manual adding of gaps with thin gaps and plotting
- in Tool Cutout, when using fix gaps made sure that this feature is not activated if the value is zero
26.08.2020

View File

@ -432,7 +432,7 @@ class CutOut(AppTool):
geo = object_geo
solid_geo, rest_geo = cutout_handler(geom=geo)
if self.ui.thin_cb.get_value():
if self.ui.thin_cb.get_value() and self.ui.thin_depth_entry.get_value() > 0:
gaps_solid_geo = rest_geo
else:
try:
@ -450,7 +450,7 @@ class CutOut(AppTool):
c_geo, r_geo = cutout_handler(geom=geom_struct)
solid_geo += c_geo
if self.ui.thin_cb.get_value():
if self.ui.thin_cb.get_value() and self.ui.thin_depth_entry.get_value() > 0:
gaps_solid_geo += r_geo
if not solid_geo:
@ -667,7 +667,7 @@ class CutOut(AppTool):
solid_geo = cutout_rect_handler(geom=geo)
if self.ui.thin_cb.get_value():
if self.ui.thin_cb.get_value() and self.ui.thin_depth_entry.get_value() > 0:
gaps_solid_geo = self.subtract_geo(geo, solid_geo)
else:
if cutout_obj.kind == 'geometry':
@ -683,7 +683,7 @@ class CutOut(AppTool):
c_geo = cutout_rect_handler(geom=geom_struct)
solid_geo += c_geo
if self.ui.thin_cb.get_value():
if self.ui.thin_cb.get_value() and self.ui.thin_depth_entry.get_value() > 0:
try:
gaps_solid_geo += self.subtract_geo(geom_struct, c_geo)
except TypeError:
@ -703,7 +703,7 @@ class CutOut(AppTool):
c_geo = cutout_rect_handler(geom=geom_struct)
solid_geo += c_geo
if self.ui.thin_cb.get_value():
if self.ui.thin_cb.get_value() and self.ui.thin_depth_entry.get_value() > 0:
try:
gaps_solid_geo += self.subtract_geo(geom_struct, c_geo)
except TypeError:
@ -845,7 +845,9 @@ class CutOut(AppTool):
cut_poly = self.cutting_geo(pos=(snapped_pos[0], snapped_pos[1]))
gaps_solid_geo = self.intersect_geo(self.manual_solid_geo, cut_poly)
gaps_solid_geo = None
if self.ui.thin_cb.get_value() and self.ui.thin_depth_entry.get_value() > 0:
gaps_solid_geo = self.intersect_geo(self.manual_solid_geo, cut_poly)
# first subtract geometry for the total solid_geometry
new_solid_geometry = CutOut.subtract_geo(self.man_cutout_obj.solid_geometry, cut_poly)
@ -1060,6 +1062,9 @@ class CutOut(AppTool):
# rebuild the manual Geometry object
self.man_cutout_obj.build_ui()
# plot the final object
self.man_cutout_obj.plot()
def on_mouse_move(self, event):
self.app.on_mouse_move_over_plot(event=event)