- fixed issue #428 - Cutout Tool -> Freeform geometry was not generated due of trying to get the bounds of the solid_geometry before it was available

This commit is contained in:
Marius Stanciu
2020-06-14 04:13:37 +03:00
committed by Marius
parent 881d461b58
commit e24b148e3a
2 changed files with 5 additions and 2 deletions

View File

@@ -708,8 +708,9 @@ class CutOut(AppTool):
solid_geo += cutout_handler(geom=geom_struct)
xmin, ymin, xmax, ymax = recursive_bounds(geo_obj.solid_geometry)
geo_obj.solid_geometry = deepcopy(solid_geo)
xmin, ymin, xmax, ymax = recursive_bounds(geo_obj.solid_geometry)
geo_obj.options['xmin'] = xmin
geo_obj.options['ymin'] = ymin
geo_obj.options['xmax'] = xmax
@@ -1428,6 +1429,7 @@ def recursive_bounds(geometry):
return minx, miny, maxx, maxy
except TypeError:
# it's a Shapely object, return it's bounds
return obj.bounds
if obj:
return obj.bounds
return bounds_rec(geometry)