- 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:
Marius Stanciu
2020-12-03 02:30:16 +02:00
committed by Marius
parent 9231530e20
commit 01f5a37bee
3 changed files with 12 additions and 7 deletions

View File

@@ -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_)