diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cb74b1b..843df7b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,8 @@ CHANGELOG for FlatCAM beta - 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 `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 diff --git a/tclCommands/TclCommandBounds.py b/tclCommands/TclCommandBounds.py index dfe506bd..1aaa650f 100644 --- a/tclCommands/TclCommandBounds.py +++ b/tclCommands/TclCommandBounds.py @@ -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'] description = '%s %s' % ("--", "Return in the console a list of bounds values for a list of objects.") diff --git a/tclCommands/TclCommandPanelize.py b/tclCommands/TclCommandPanelize.py index 0d1c768c..2632a29f 100644 --- a/tclCommands/TclCommandPanelize.py +++ b/tclCommands/TclCommandPanelize.py @@ -331,19 +331,19 @@ class TclCommandPanelize(TclCommand): if not trans_geo.is_empty: obj_fin.tools[tool]['solid_geometry'].append(trans_geo) - # ############################################################################# - # ########## Panelize the solid_geometry - always done ##################### - # ############################################################################# - try: - sol_geo = obj.solid_geometry - work_geo = sol_geo.geoms if \ - isinstance(sol_geo, (MultiPolygon, MultiLineString)) else sol_geo - for geo_el in work_geo: - trans_geo = translate_recursion(geo_el) - obj_fin.solid_geometry.append(trans_geo) - except TypeError: - trans_geo = translate_recursion(obj.solid_geometry) + # ############################################################################# + # ########## Panelize the solid_geometry - always done ##################### + # ############################################################################# + try: + sol_geo = obj.solid_geometry + work_geo = sol_geo.geoms if \ + isinstance(sol_geo, (MultiPolygon, MultiLineString)) else sol_geo + for geo_el in work_geo: + 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) else: obj_fin.solid_geometry.append( translate_recursion(obj.solid_geometry)