- brought up-to-date and fixed the Tcl Command Drillcncjob and Cncjob
- fixed Tcl command Isolate to not print messages on message bar in case it is run headless - fixed Tcl command Copper Clear (NCC) - fixed Tcl command Paint
This commit is contained in:
@@ -2836,10 +2836,10 @@ class NonCopperClear(AppTool, Gerber):
|
||||
# Generate area for each tool
|
||||
offset_a = sum(sorted_tools)
|
||||
current_uid = int(1)
|
||||
try:
|
||||
tool = eval(self.app.defaults["tools_ncc_tools"])[0]
|
||||
except TypeError:
|
||||
tool = eval(self.app.defaults["tools_ncc_tools"])
|
||||
# try:
|
||||
# tool = eval(self.app.defaults["tools_ncc_tools"])[0]
|
||||
# except TypeError:
|
||||
# tool = eval(self.app.defaults["tools_ncc_tools"])
|
||||
|
||||
# ###################################################################################################
|
||||
# Calculate the empty area by subtracting the solid_geometry from the object bounding box geometry ##
|
||||
@@ -2854,6 +2854,8 @@ class NonCopperClear(AppTool, Gerber):
|
||||
sol_geo = ncc_obj.solid_geometry.buffer(0)
|
||||
else:
|
||||
sol_geo = ncc_obj.solid_geometry
|
||||
if isinstance(sol_geo, list):
|
||||
sol_geo = unary_union(sol_geo)
|
||||
|
||||
if has_offset is True:
|
||||
app_obj.inform.emit('[WARNING_NOTCL] %s ...' % _("Buffering"))
|
||||
|
||||
@@ -2234,7 +2234,9 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.app.inform.emit('%s %s' % (_("Paint Tool."), _("Normal painting polygon task started.")))
|
||||
|
||||
if inside_pt and poly_list is None:
|
||||
polygon_list = [self.find_polygon(point=inside_pt, geoset=obj.solid_geometry)]
|
||||
polygon_list = self.find_polygon(point=inside_pt, geoset=obj.solid_geometry)
|
||||
if polygon_list:
|
||||
polygon_list = [polygon_list]
|
||||
elif (inside_pt is None and poly_list) or (inside_pt and poly_list):
|
||||
polygon_list = poly_list
|
||||
else:
|
||||
@@ -2244,7 +2246,7 @@ class ToolPaint(AppTool, Gerber):
|
||||
if polygon_list is None:
|
||||
self.app.log.warning('No polygon found.')
|
||||
self.app.inform.emit('[WARNING] %s' % _('No polygon found.'))
|
||||
return
|
||||
return "fail"
|
||||
|
||||
self.paint_geo(obj, polygon_list, tooldia=tooldia, order=order, method=method, outname=outname,
|
||||
tools_storage=tools_storage, plot=plot, run_threaded=run_threaded)
|
||||
|
||||
Reference in New Issue
Block a user