- fixed the Tcl Command AlignDrill

- fixed the Tcl Command AlignDrillGrid
- fixed the Tcl COmmand Panelize, Excellon panelization section
- Fixed an issue in Tool Calibration export_excellon method call
- PEP8 corrections all over the app
This commit is contained in:
Marius Stanciu
2020-11-02 03:32:00 +02:00
committed by Marius
parent fac4caf961
commit 374c29b4b0
63 changed files with 492 additions and 537 deletions

View File

@@ -639,7 +639,7 @@ class ToolCalibration(AppTool):
if obj.tools:
obj_init.tools = deepcopy(obj.tools)
except Exception as ee:
log.debug("ToolCalibration.new_calibrated_object.initialize_geometry() --> %s" % str(ee))
app.log.debug("ToolCalibration.new_calibrated_object.initialize_geometry() --> %s" % str(ee))
obj_init.scale(xfactor=scalex, yfactor=scaley, point=(origin_x, origin_y))
obj_init.skew(angle_x=skewx, angle_y=skewy, point=(origin_x, origin_y))
@@ -649,7 +649,7 @@ class ToolCalibration(AppTool):
except (AttributeError, TypeError):
pass
def initialize_gerber(obj_init, app):
def initialize_gerber(obj_init, app_obj):
obj_init.solid_geometry = deepcopy(obj.solid_geometry)
try:
obj_init.follow_geometry = deepcopy(obj.follow_geometry)
@@ -671,12 +671,12 @@ class ToolCalibration(AppTool):
obj_init.skew(angle_x=skewx, angle_y=skewy, point=(origin_x, origin_y))
try:
obj_init.source_file = self.app.f_handlers.export_gerber(obj_name=obj_name, filename=None,
local_use=obj_init, use_thread=False)
obj_init.source_file = app_obj.f_handlers.export_gerber(obj_name=obj_name, filename=None,
local_use=obj_init, use_thread=False)
except (AttributeError, TypeError):
pass
def initialize_excellon(obj_init, app):
def initialize_excellon(obj_init, app_obj):
obj_init.tools = deepcopy(obj.tools)
# drills are offset, so they need to be deep copied
@@ -689,8 +689,8 @@ class ToolCalibration(AppTool):
obj_init.create_geometry()
obj_init.source_file = self.app.export.export_excellon(obj_name=obj_name, local_use=obj, filename=None,
use_thread=False)
obj_init.source_file = app_obj.f_handlers.export_excellon(obj_name=obj_name, local_use=obj, filename=None,
use_thread=False)
obj = self.cal_object
obj_name = obj_name