- 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:
@@ -13,6 +13,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- if clicking the activity icon in the status bar and there is no object selected then the effect will be a plot_all with fit_view
|
- if clicking the activity icon in the status bar and there is no object selected then the effect will be a plot_all with fit_view
|
||||||
- modified the FCLabel GUI element
|
- modified the FCLabel GUI element
|
||||||
- NCC Tool - remade and optimized the copper clearing with rest machining: now it works as expected with a reasonable performance
|
- NCC Tool - remade and optimized the copper clearing with rest machining: now it works as expected with a reasonable performance
|
||||||
|
- 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
|
||||||
|
|
||||||
13.06.2020
|
13.06.2020
|
||||||
|
|
||||||
|
|||||||
@@ -708,8 +708,9 @@ class CutOut(AppTool):
|
|||||||
|
|
||||||
solid_geo += cutout_handler(geom=geom_struct)
|
solid_geo += cutout_handler(geom=geom_struct)
|
||||||
|
|
||||||
xmin, ymin, xmax, ymax = recursive_bounds(geo_obj.solid_geometry)
|
|
||||||
geo_obj.solid_geometry = deepcopy(solid_geo)
|
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['xmin'] = xmin
|
||||||
geo_obj.options['ymin'] = ymin
|
geo_obj.options['ymin'] = ymin
|
||||||
geo_obj.options['xmax'] = xmax
|
geo_obj.options['xmax'] = xmax
|
||||||
@@ -1428,6 +1429,7 @@ def recursive_bounds(geometry):
|
|||||||
return minx, miny, maxx, maxy
|
return minx, miny, maxx, maxy
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# it's a Shapely object, return it's bounds
|
# it's a Shapely object, return it's bounds
|
||||||
return obj.bounds
|
if obj:
|
||||||
|
return obj.bounds
|
||||||
|
|
||||||
return bounds_rec(geometry)
|
return bounds_rec(geometry)
|
||||||
|
|||||||
Reference in New Issue
Block a user