- modified the bounding box utility feature in the Gerber Object UI to work with buffer value of 0.0 and rounded corners

This commit is contained in:
Marius Stanciu
2022-01-26 12:23:12 +02:00
committed by Marius
parent 5a912c6885
commit 5d3fce12d5
3 changed files with 15 additions and 3 deletions

View File

@@ -2506,7 +2506,10 @@ class Gerber(Geometry):
# variables to display the percentage of work done
self.geo_len = 0
try:
self.geo_len = len(self.solid_geometry)
if isinstance(self.solid_geometry, (MultiPolygon, MultiLineString)):
self.geo_len = len(self.solid_geometry.geoms)
else:
self.geo_len = len(self.solid_geometry)
except (TypeError, ValueError, RuntimeError):
self.geo_len = 1