- optimized the storage of the Gerber mark shapes by making them one layer only

- optimized the Distance Tool such that the distance utility geometry will be shown even when the mark shapes are plotted.
This commit is contained in:
Marius Stanciu
2019-11-17 00:21:47 +02:00
committed by Marius
parent 021e094b73
commit d327160ab9
3 changed files with 15 additions and 4 deletions

View File

@@ -409,7 +409,7 @@ class FlatCAMObj(QtCore.QObject):
if self.deleted: if self.deleted:
raise ObjectDeleted() raise ObjectDeleted()
else: else:
key = self.mark_shapes[apid].add(tolerance=self.drawing_tolerance, **kwargs) key = self.mark_shapes[apid].add(tolerance=self.drawing_tolerance, layer=0, **kwargs)
return key return key
def update_filters(self, last_ext, filter_string): def update_filters(self, last_ext, filter_string):
@@ -1413,7 +1413,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
# add the shapes storage for marking apertures # add the shapes storage for marking apertures
if self.app.is_legacy is False: if self.app.is_legacy is False:
for ap_code in self.apertures: for ap_code in self.apertures:
self.mark_shapes[ap_code] = self.app.plotcanvas.new_shape_collection(layers=2) self.mark_shapes[ap_code] = self.app.plotcanvas.new_shape_collection(layers=1)
else: else:
for ap_code in self.apertures: for ap_code in self.apertures:
self.mark_shapes[ap_code] = ShapeCollectionLegacy(obj=self, app=self.app, self.mark_shapes[ap_code] = ShapeCollectionLegacy(obj=self, app=self.app,
@@ -1675,7 +1675,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
if self.ui.apertures_table.cellWidget(cw_row, 5).isChecked(): if self.ui.apertures_table.cellWidget(cw_row, 5).isChecked():
self.marked_rows.append(True) self.marked_rows.append(True)
# self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True) # self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True)
self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'FF', self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'AF',
marked_aperture=aperture, visible=True, run_thread=True) marked_aperture=aperture, visible=True, run_thread=True)
# self.mark_shapes[aperture].redraw() # self.mark_shapes[aperture].redraw()
else: else:
@@ -1713,7 +1713,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
if mark_all: if mark_all:
for aperture in self.apertures: for aperture in self.apertures:
# self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True) # self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True)
self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'FF', self.plot_aperture(color=self.app.defaults['global_sel_draw_color'] + 'AF',
marked_aperture=aperture, visible=True) marked_aperture=aperture, visible=True)
# HACK: enable/disable the grid for a better look # HACK: enable/disable the grid for a better look
self.app.ui.grid_snap_btn.trigger() self.app.ui.grid_snap_btn.trigger()

View File

@@ -9,6 +9,11 @@ CAD program, and create G-Code for Isolation routing.
================================================= =================================================
17.11.2019
- optimized the storage of the Gerber mark shapes by making them one layer only
- optimized the Distance Tool such that the distance utility geometry will be shown even when the mark shapes are plotted.
16.11.2019 16.11.2019
- fixed issue #341 that affected both postprocessors that have inlined feedrate: marlin and repetier. THe used feedrate was the Feedrate X-Y and instead had to be Feedrate Z. - fixed issue #341 that affected both postprocessors that have inlined feedrate: marlin and repetier. THe used feedrate was the Feedrate X-Y and instead had to be Feedrate Z.

View File

@@ -194,6 +194,12 @@ class Distance(FlatCAMTool):
self.distance_y_entry.set_value('0.0') self.distance_y_entry.set_value('0.0')
self.angle_entry.set_value('0.0') self.angle_entry.set_value('0.0')
self.total_distance_entry.set_value('0.0') self.total_distance_entry.set_value('0.0')
# this is a hack; seems that triggering the grid will make the visuals better
# trigger it twice to return to the original state
self.app.ui.grid_snap_btn.trigger()
self.app.ui.grid_snap_btn.trigger()
log.debug("Distance Tool --> tool initialized") log.debug("Distance Tool --> tool initialized")
def activate_measure_tool(self): def activate_measure_tool(self):