- refactored the imports in the Plugins, moved almost all imports in the AppTool file

- fixed a number of issues, mostly leftovers from moving the UI of a Plugin in its own class
- fixed some bugs in the Punch Gerber plugin
- fixed some bugs where the 'pool' parameter was not passed when creating shapes collections (in 3D graphic mode); I wonder how it worked until now
- added a new feature in the Isolation Plugin: now for all the isolation Geometry objects this plugin can do a supplementary simplification of the geometry using the tolerance parameter defined in the General Parameters. This should lead to a reduced number of tool lifts when doing corners
This commit is contained in:
Marius Stanciu
2022-03-31 19:28:19 +03:00
committed by Marius Stanciu
parent e1824a09f7
commit ada48269a9
43 changed files with 378 additions and 797 deletions

View File

@@ -5,21 +5,7 @@
# MIT Licence #
# ##########################################################
from PyQt6 import QtWidgets, QtCore, QtGui
from appTool import AppTool
from appGUI.GUIElements import FCCheckBox, FCButton, FCComboBox, FCLabel, VerticalScrollArea, FCGridLayout, FCFrame
from shapely.geometry import Polygon, MultiPolygon, MultiLineString, LineString
from shapely.ops import unary_union
import traceback
from copy import deepcopy
import time
import logging
import gettext
import appTranslation as fcTranslate
import builtins
from appTool import *
fcTranslate.apply_language('strings')
if '_' not in builtins.__dict__:
@@ -283,7 +269,8 @@ class ToolSub(AppTool):
self.target_grb_obj = self.app.collection.get_by_name(self.target_grb_obj_name)
except Exception as e:
self.app.log.error("ToolSub.on_subtract_gerber_click() --> %s" % str(e))
self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), self.obj_name))
self.app.inform.emit(
'[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), self.target_grb_obj.obj_options['name']))
return "Could not retrieve object: %s" % self.target_grb_obj_name
# --------------------------------
@@ -301,7 +288,8 @@ class ToolSub(AppTool):
self.sub_grb_obj = self.app.collection.get_by_name(self.sub_grb_obj_name)
except Exception as e:
self.app.log.error("ToolSub.on_subtract_gerber_click() --> %s" % str(e))
self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), self.obj_name))
self.app.inform.emit(
'[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), self.target_grb_obj.obj_options['name']))
return "Could not retrieve object: %s" % self.sub_grb_obj_name
if self.target_grb_obj_name == self.sub_grb_obj_name:
@@ -648,6 +636,7 @@ class ToolSub(AppTool):
def new_geo_object(self, outname):
geo_name = outname
def obj_init(geo_obj, app_obj):
# geo_obj.obj_options = self.target_options