mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 15:07:38 +00:00
Fix #2836. Bug where very small lines could accidentally be seen as closed loops due to paperspace rounding.
This commit is contained in:
@@ -532,7 +532,7 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
for subpath in path.attrib["d"].split("M")[1:]:
|
for subpath in path.attrib["d"].split("M")[1:]:
|
||||||
subpath = "M" + subpath.strip()
|
subpath = "M" + subpath.strip()
|
||||||
coords = [[round(float(o), 1) for o in co[1:].split(",")] for co in subpath.split()]
|
coords = [[round(float(o), 1) for o in co[1:].split(",")] for co in subpath.split()]
|
||||||
if coords[0] == coords[-1]:
|
if len(coords) > 2 and coords[0] == coords[-1]:
|
||||||
is_closed_polygon = True
|
is_closed_polygon = True
|
||||||
polygons.append(shapely.Polygon(coords))
|
polygons.append(shapely.Polygon(coords))
|
||||||
if is_closed_polygon:
|
if is_closed_polygon:
|
||||||
|
|||||||
Reference in New Issue
Block a user