- fixed a performance issue in panelize Tcl command: when panelizing a Geometry object the total solid_geometry was calculated for each tool, but it was enough to be calculated once
This commit is contained in:
@@ -22,7 +22,8 @@ CHANGELOG for FlatCAM beta
|
|||||||
- yet another fix for Shapely 2.0 deprecation warnings
|
- yet another fix for Shapely 2.0 deprecation warnings
|
||||||
- updated the `join_geometry` and `join_excellon` Tcl commands format to follow the format of other commands
|
- updated the `join_geometry` and `join_excellon` Tcl commands format to follow the format of other commands
|
||||||
- updated the `isolate`, `cutout` and `geocutout` Tcl commands and now they yield multigeo Geometry objects
|
- updated the `isolate`, `cutout` and `geocutout` Tcl commands and now they yield multigeo Geometry objects
|
||||||
- fixed an issue in `panelize` Tcl command where the some parameters (`spacing_columns` and `spacing_rows` where forced into integers where correct was to keep them as floats)
|
- fixed an issue in `panelize` Tcl command where some parameters (`spacing_columns` and `spacing_rows` where forced into integers where correct was to keep them as floats)
|
||||||
|
- fixed a performance issue in `panelize` Tcl command: when panelizing a Geometry object the total solid_geometry was calculated for each tool, but it was enough to be calculated once
|
||||||
|
|
||||||
30.01.2022
|
30.01.2022
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class TclCommandBounds(TclCommand):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
|
# List of all command aliases, to be able to use old names for backward compatibility (add_poly, add_polygon)
|
||||||
aliases = ['get_bounds', 'bounds']
|
aliases = ['get_bounds', 'bounds']
|
||||||
|
|
||||||
description = '%s %s' % ("--", "Return in the console a list of bounds values for a list of objects.")
|
description = '%s %s' % ("--", "Return in the console a list of bounds values for a list of objects.")
|
||||||
|
|||||||
@@ -331,19 +331,19 @@ class TclCommandPanelize(TclCommand):
|
|||||||
if not trans_geo.is_empty:
|
if not trans_geo.is_empty:
|
||||||
obj_fin.tools[tool]['solid_geometry'].append(trans_geo)
|
obj_fin.tools[tool]['solid_geometry'].append(trans_geo)
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# ########## Panelize the solid_geometry - always done #####################
|
# ########## Panelize the solid_geometry - always done #####################
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
try:
|
try:
|
||||||
sol_geo = obj.solid_geometry
|
sol_geo = obj.solid_geometry
|
||||||
work_geo = sol_geo.geoms if \
|
work_geo = sol_geo.geoms if \
|
||||||
isinstance(sol_geo, (MultiPolygon, MultiLineString)) else sol_geo
|
isinstance(sol_geo, (MultiPolygon, MultiLineString)) else sol_geo
|
||||||
for geo_el in work_geo:
|
for geo_el in work_geo:
|
||||||
trans_geo = translate_recursion(geo_el)
|
trans_geo = translate_recursion(geo_el)
|
||||||
obj_fin.solid_geometry.append(trans_geo)
|
|
||||||
except TypeError:
|
|
||||||
trans_geo = translate_recursion(obj.solid_geometry)
|
|
||||||
obj_fin.solid_geometry.append(trans_geo)
|
obj_fin.solid_geometry.append(trans_geo)
|
||||||
|
except TypeError:
|
||||||
|
trans_geo = translate_recursion(obj.solid_geometry)
|
||||||
|
obj_fin.solid_geometry.append(trans_geo)
|
||||||
else:
|
else:
|
||||||
obj_fin.solid_geometry.append(
|
obj_fin.solid_geometry.append(
|
||||||
translate_recursion(obj.solid_geometry)
|
translate_recursion(obj.solid_geometry)
|
||||||
|
|||||||
Reference in New Issue
Block a user