diff --git a/README.md b/README.md index 9e6b7da7..9aaf39a2 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ CAD program, and create G-Code for Isolation routing. - fixed the loading of Excellon with slots and the saving of edited Excellon object in regard of slots, in Excellon Editor - fixed the Delete tool, Select tool in Excellon Editor to work for Slots too +- changes in the way the edited Excellon with added slots is saved +- added more icons and cursor in Excellon Editor for Slots related functions 13.08.2019 diff --git a/flatcamEditors/FlatCAMExcEditor.py b/flatcamEditors/FlatCAMExcEditor.py index 70c4d3a8..eb7dec06 100644 --- a/flatcamEditors/FlatCAMExcEditor.py +++ b/flatcamEditors/FlatCAMExcEditor.py @@ -355,7 +355,7 @@ class FCSlot(FCShapeTool): QtGui.QGuiApplication.restoreOverrideCursor() except Exception as e: pass - self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_circle.png')) + self.cursor = QtGui.QCursor(QtGui.QPixmap('share/aero_slot.png')) QtGui.QGuiApplication.setOverrideCursor(self.cursor) self.steps_per_circ = self.draw_app.app.defaults["geometry_circle_steps"] @@ -387,6 +387,10 @@ class FCSlot(FCShapeTool): return None def util_shape(self, point): + + if point is None: + return + # updating values here allows us to change the aperture on the fly, after the Tool has been started self.selected_dia = self.draw_app.tool2tooldia[self.draw_app.last_tool_selected] self.radius = float(self.selected_dia / 2.0) @@ -2528,6 +2532,9 @@ class FlatCAMExcEditor(QtCore.QObject): self.exc_obj = exc_obj exc_obj.visible = False + self.points_edit = {} + self.slot_points_edit = {} + # Set selection tolerance # DrawToolShape.tolerance = fc_excellon.drawing_tolerance * 10 @@ -3211,7 +3218,8 @@ class FlatCAMExcEditor(QtCore.QObject): if event.is_dragging == 1 and event.button == 1: # I make an exception for FCDrillAdd and FCDrillArray because clicking and dragging while making regions # can create strange issues - if isinstance(self.active_tool, FCDrillAdd) or isinstance(self.active_tool, FCDrillArray): + if isinstance(self.active_tool, FCDrillAdd) or isinstance(self.active_tool, FCDrillArray) or \ + isinstance(self.active_tool, FCSlot) or isinstance(self.active_tool, FCSlotArray): pass else: dx = pos[0] - self.pos[0] diff --git a/flatcamGUI/FlatCAMGUI.py b/flatcamGUI/FlatCAMGUI.py index 353b9c8a..2dbb0911 100644 --- a/flatcamGUI/FlatCAMGUI.py +++ b/flatcamGUI/FlatCAMGUI.py @@ -450,8 +450,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.exc_editor_menu.addSeparator() self.exc_add_array_slot_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon('share/rectangle32.png'), _('Add Slot Array\tQ')) - self.exc_add_slot_menuitem = self.exc_editor_menu.addAction(QtGui.QIcon('share/plus16.png'), + QtGui.QIcon('share/slot_array26.png'), _('Add Slot Array\tQ')) + self.exc_add_slot_menuitem = self.exc_editor_menu.addAction(QtGui.QIcon('share/slot26.png'), _('Add Slot\tW')) self.exc_editor_menu.addSeparator() @@ -660,9 +660,9 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.add_drill_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/plus16.png'), _('Add Drill Hole')) self.add_drill_array_btn = self.exc_edit_toolbar.addAction( QtGui.QIcon('share/addarray16.png'), _('Add Drill Hole Array')) - self.add_slot_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/plus16.png'), _('Add Slot')) + self.add_slot_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/slot26.png'), _('Add Slot')) self.add_slot_array_btn = self.exc_edit_toolbar.addAction( - QtGui.QIcon('share/addarray16.png'), _('Add Slot Array')) + QtGui.QIcon('share/slot_array26.png'), _('Add Slot Array')) self.resize_drill_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/resize16.png'), _('Resize Drill')) self.exc_edit_toolbar.addSeparator() @@ -1674,8 +1674,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.drill = self.e_editor_cmenu.addAction(QtGui.QIcon('share/drill32.png'), _("Add Drill")) self.drill_array = self.e_editor_cmenu.addAction(QtGui.QIcon('share/addarray32.png'), _("Add Drill Array")) self.e_editor_cmenu.addSeparator() - self.slot = self.e_editor_cmenu.addAction(QtGui.QIcon('share/drill32.png'), _("Add Slot")) - self.slot_array = self.e_editor_cmenu.addAction(QtGui.QIcon('share/addarray32.png'), _("Add Slot Array")) + self.slot = self.e_editor_cmenu.addAction(QtGui.QIcon('share/slot26.png'), _("Add Slot")) + self.slot_array = self.e_editor_cmenu.addAction(QtGui.QIcon('share/slot_array26.png'), _("Add Slot Array")) self.e_editor_cmenu.addSeparator() self.drill_resize= self.e_editor_cmenu.addAction(QtGui.QIcon('share/resize16.png'), _("Resize Drill")) @@ -1955,9 +1955,9 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.add_drill_array_btn = self.exc_edit_toolbar.addAction( QtGui.QIcon('share/addarray16.png'), _('Add Drill Hole Array')) self.resize_drill_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/resize16.png'), _('Resize Drill')) - self.add_slot_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/plus16.png'), _('Add Slot')) + self.add_slot_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/slot26.png'), _('Add Slot')) self.add_slot_array_btn = self.exc_edit_toolbar.addAction( - QtGui.QIcon('share/addarray16.png'), _('Add Slot Array')) + QtGui.QIcon('share/slot_array26.png'), _('Add Slot Array')) self.exc_edit_toolbar.addSeparator() self.copy_drill_btn = self.exc_edit_toolbar.addAction(QtGui.QIcon('share/copy32.png'), _('Copy Drill')) diff --git a/share/aero_slot.png b/share/aero_slot.png new file mode 100644 index 00000000..9030896f Binary files /dev/null and b/share/aero_slot.png differ diff --git a/share/slot26.png b/share/slot26.png new file mode 100644 index 00000000..687efbbb Binary files /dev/null and b/share/slot26.png differ diff --git a/share/slot_array26.png b/share/slot_array26.png new file mode 100644 index 00000000..65b185cb Binary files /dev/null and b/share/slot_array26.png differ