- in NCC Tool added ability to add multiple zones to clear when Area option is checked and the modifier key is pressed (either CTRL or SHIFT as set in Preferences). Right click of the mouse is an additional way to finish the job.
- fixed a bug in Excellon Editor that made that the selection of drills is always cumulative
This commit is contained in:
parent
1ce0ff9d4a
commit
2fbb480f86
@ -13,6 +13,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- in Tool Cutout for the manual gaps, right mouse button click will exit from the action of adding gaps
|
- in Tool Cutout for the manual gaps, right mouse button click will exit from the action of adding gaps
|
||||||
- in Tool Cutout tool I've added the possibility to create a cutout without bridge gaps; added the 'None' option in the Gaps combobox
|
- in Tool Cutout tool I've added the possibility to create a cutout without bridge gaps; added the 'None' option in the Gaps combobox
|
||||||
|
- in NCC Tool added ability to add multiple zones to clear when Area option is checked and the modifier key is pressed (either CTRL or SHIFT as set in Preferences). Right click of the mouse is an additional way to finish the job.
|
||||||
|
- fixed a bug in Excellon Editor that made that the selection of drills is always cumulative
|
||||||
|
|
||||||
22.08.2019
|
22.08.2019
|
||||||
|
|
||||||
|
@ -1308,11 +1308,13 @@ class FCDrillSelect(DrawTool):
|
|||||||
self.exc_editor_app.selected = []
|
self.exc_editor_app.selected = []
|
||||||
else:
|
else:
|
||||||
modifiers = QtWidgets.QApplication.keyboardModifiers()
|
modifiers = QtWidgets.QApplication.keyboardModifiers()
|
||||||
mod_key = 'Control'
|
|
||||||
if modifiers == QtCore.Qt.ShiftModifier:
|
if modifiers == QtCore.Qt.ShiftModifier:
|
||||||
mod_key = 'Shift'
|
mod_key = 'Shift'
|
||||||
elif modifiers == QtCore.Qt.ControlModifier:
|
elif modifiers == QtCore.Qt.ControlModifier:
|
||||||
mod_key = 'Control'
|
mod_key = 'Control'
|
||||||
|
else:
|
||||||
|
mod_key = None
|
||||||
|
|
||||||
if mod_key == self.draw_app.app.defaults["global_mselect_key"]:
|
if mod_key == self.draw_app.app.defaults["global_mselect_key"]:
|
||||||
if closest_shape in self.exc_editor_app.selected:
|
if closest_shape in self.exc_editor_app.selected:
|
||||||
|
@ -848,7 +848,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
def on_mouse_press(event):
|
def on_mouse_press(event):
|
||||||
# do paint single only for left mouse clicks
|
# do paint single only for left mouse clicks
|
||||||
if event.button == 1:
|
if event.button == 1:
|
||||||
if not self.first_click:
|
if self.first_click is False:
|
||||||
self.first_click = True
|
self.first_click = True
|
||||||
self.app.inform.emit(_("[WARNING_NOTCL] Click the end point of the paint area."))
|
self.app.inform.emit(_("[WARNING_NOTCL] Click the end point of the paint area."))
|
||||||
|
|
||||||
@ -856,8 +856,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
if self.app.grid_status() == True:
|
if self.app.grid_status() == True:
|
||||||
self.cursor_pos = self.app.geo_editor.snap(self.cursor_pos[0], self.cursor_pos[1])
|
self.cursor_pos = self.app.geo_editor.snap(self.cursor_pos[0], self.cursor_pos[1])
|
||||||
else:
|
else:
|
||||||
self.app.inform.emit(_("Done."))
|
self.app.inform.emit(_("Zone added. Right click to finish."))
|
||||||
self.first_click = False
|
|
||||||
self.app.delete_selection_shape()
|
self.app.delete_selection_shape()
|
||||||
|
|
||||||
curr_pos = self.app.plotcanvas.vispy_canvas.translate_coords(event.pos)
|
curr_pos = self.app.plotcanvas.vispy_canvas.translate_coords(event.pos)
|
||||||
@ -870,24 +869,31 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
pt2 = (x1, y0)
|
pt2 = (x1, y0)
|
||||||
pt3 = (x1, y1)
|
pt3 = (x1, y1)
|
||||||
pt4 = (x0, y1)
|
pt4 = (x0, y1)
|
||||||
self.sel_rect = [Polygon([pt1, pt2, pt3, pt4])]
|
self.sel_rect.append(Polygon([pt1, pt2, pt3, pt4]))
|
||||||
|
|
||||||
# def initialize(geo_obj, app_obj):
|
modifiers = QtWidgets.QApplication.keyboardModifiers()
|
||||||
# geo_obj.solid_geometry = self.sel_rect
|
|
||||||
# geo_obj.multigeo = False
|
|
||||||
#
|
|
||||||
# self.app.new_object("geometry", "bound_ncc", initialize=initialize,
|
|
||||||
# plot=True, autoselected=False)
|
|
||||||
#
|
|
||||||
# self.bound_obj_name = "bound_ncc"
|
|
||||||
# # Get source object.
|
|
||||||
# try:
|
|
||||||
# self.bound_obj = self.app.collection.get_by_name(self.bound_obj_name)
|
|
||||||
# except Exception as e:
|
|
||||||
# self.app.inform.emit(_("[ERROR_NOTCL] Could not retrieve object: %s") %
|
|
||||||
# self.bound_obj_name)
|
|
||||||
# return "Could not retrieve object: %s. Error: %s" % (self.bound_obj_name, str(e))
|
|
||||||
|
|
||||||
|
if modifiers == QtCore.Qt.ShiftModifier:
|
||||||
|
mod_key = 'Shift'
|
||||||
|
elif modifiers == QtCore.Qt.ControlModifier:
|
||||||
|
mod_key = 'Control'
|
||||||
|
else:
|
||||||
|
mod_key = None
|
||||||
|
|
||||||
|
if mod_key == self.app.defaults["global_mselect_key"]:
|
||||||
|
self.first_click = False
|
||||||
|
return
|
||||||
|
|
||||||
|
self.app.plotcanvas.vis_disconnect('mouse_press', on_mouse_press)
|
||||||
|
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
||||||
|
|
||||||
|
self.app.plotcanvas.vis_connect('mouse_press', self.app.on_mouse_click_over_plot)
|
||||||
|
self.app.plotcanvas.vis_connect('mouse_move', self.app.on_mouse_move_over_plot)
|
||||||
|
self.app.plotcanvas.vis_connect('mouse_release', self.app.on_mouse_click_release_over_plot)
|
||||||
|
|
||||||
|
self.on_ncc()
|
||||||
|
elif event.button == 2:
|
||||||
|
self.first_click = False
|
||||||
self.app.plotcanvas.vis_disconnect('mouse_press', on_mouse_press)
|
self.app.plotcanvas.vis_disconnect('mouse_press', on_mouse_press)
|
||||||
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
self.app.plotcanvas.vis_disconnect('mouse_move', on_mouse_move)
|
||||||
|
|
||||||
@ -985,6 +991,11 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
# Prepare non-copper polygons
|
# Prepare non-copper polygons
|
||||||
if self.reference_radio.get_value() == 'area':
|
if self.reference_radio.get_value() == 'area':
|
||||||
geo_n = self.sel_rect
|
geo_n = self.sel_rect
|
||||||
|
|
||||||
|
geo_buff_list = []
|
||||||
|
for poly in geo_n:
|
||||||
|
geo_buff_list.append(poly.buffer(distance=margin, join_style=base.JOIN_STYLE.mitre))
|
||||||
|
bounding_box = cascaded_union(geo_buff_list)
|
||||||
else:
|
else:
|
||||||
geo_n = self.bound_obj.solid_geometry
|
geo_n = self.bound_obj.solid_geometry
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user