- in Panelize Tool - made sure that when the path optimization will yield an empty geometry it will not be added to the panel geometry
This commit is contained in:
@@ -17,6 +17,7 @@ CHANGELOG for FlatCAM beta
|
||||
- in Panelize Tool - fixed the export when panelizing Excllon objects
|
||||
- in Panelize Tool - remade the methods such that panelizing a Gerber object as Geometry panel will now hold all the Gerber apertures as Geometry tools and added a supplementary tool that holds the solid_geometry.
|
||||
- in Panelize Tool - remade the methods such that panelizing a Geometry object as a Gerber panel will attempt to create polygons from Geometry
|
||||
- in Panelize Tool - made sure that when the path optimization will yield an empty geometry it will not be added to the panel geometry
|
||||
|
||||
1.12.2020
|
||||
|
||||
|
||||
@@ -470,6 +470,7 @@ class Panelize(AppTool):
|
||||
pol_nr = 0
|
||||
for geo_el in panel_source_obj.tools[tool]['solid_geometry']:
|
||||
trans_geo = translate_recursion(geo_el)
|
||||
if not trans_geo.is_empty:
|
||||
new_obj.tools[tool]['solid_geometry'].append(trans_geo)
|
||||
|
||||
# update progress
|
||||
@@ -615,7 +616,7 @@ class Panelize(AppTool):
|
||||
lines[idx_s] = res
|
||||
|
||||
fused_lines = linemerge(lines)
|
||||
fused_lines = [unary_union(fused_lines)]
|
||||
fused_lines = [unary_union(fused_lines)] if not fused_lines.is_empty else []
|
||||
|
||||
new_obj.tools[tool]['solid_geometry'] = fused_lines + other_geo
|
||||
|
||||
@@ -749,6 +750,7 @@ class Panelize(AppTool):
|
||||
pol_nr = 0
|
||||
for geo_el in panel_source_obj.tools[tool]['solid_geometry']:
|
||||
trans_geo = translate_recursion(geo_el)
|
||||
if not trans_geo.is_empty:
|
||||
new_obj.tools[tool]['solid_geometry'].append(trans_geo)
|
||||
|
||||
# update progress
|
||||
|
||||
10
camlib.py
10
camlib.py
@@ -7583,8 +7583,10 @@ class CNCjob(Geometry):
|
||||
maxx = -np.Inf
|
||||
maxy = -np.Inf
|
||||
try:
|
||||
for k in v['solid_geometry']:
|
||||
minx_, miny_, maxx_, maxy_ = bounds_rec(k)
|
||||
for geo in v['solid_geometry']:
|
||||
if geo.is_empty:
|
||||
continue
|
||||
minx_, miny_, maxx_, maxy_ = bounds_rec(geo)
|
||||
minx = min(minx, minx_)
|
||||
miny = min(miny, miny_)
|
||||
maxx = max(maxx, maxx_)
|
||||
@@ -7603,8 +7605,8 @@ class CNCjob(Geometry):
|
||||
maxx = -np.Inf
|
||||
maxy = -np.Inf
|
||||
try:
|
||||
for k in v['solid_geometry']:
|
||||
minx_, miny_, maxx_, maxy_ = bounds_rec(k)
|
||||
for geo in v['solid_geometry']:
|
||||
minx_, miny_, maxx_, maxy_ = bounds_rec(geo)
|
||||
minx = min(minx, minx_)
|
||||
miny = min(miny, miny_)
|
||||
maxx = max(maxx, maxx_)
|
||||
|
||||
Reference in New Issue
Block a user