Fix #2836. Bug where very small lines could accidentally be seen as closed loops due to paperspace rounding.

This commit is contained in:
Dion Moult
2023-03-06 12:07:28 +11:00
parent fba84ecd3c
commit a8f1df8a50
@@ -532,7 +532,7 @@ class CreateDrawing(bpy.types.Operator):
for subpath in path.attrib["d"].split("M")[1:]:
subpath = "M" + subpath.strip()
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
polygons.append(shapely.Polygon(coords))
if is_closed_polygon: