From e2f0b1ed5c5c68a82b6f619c19be8c3c735ee44e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 3 Mar 2024 15:36:19 +1100 Subject: [PATCH] Fix #4336. Close #4337. Remove rounding for more accurate fills. --- src/blenderbim/blenderbim/bim/module/drawing/operator.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/drawing/operator.py b/src/blenderbim/blenderbim/bim/module/drawing/operator.py index bd47e00c98..9702b9188a 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/operator.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/operator.py @@ -579,8 +579,7 @@ class CreateDrawing(bpy.types.Operator): if global_id not in elements_with_faces: continue for path in projection.findall("./{http://www.w3.org/2000/svg}path"): - # Rounding is necessary to ensure coincident points are coincident - start, end = [[round(float(o), 1) for o in co[1:].split(",")] for co in path.attrib["d"].split()] + start, end = [[float(o) for o in co[1:].split(",")] for co in path.attrib["d"].split()] if start == end: continue # Extension by 0.5mm is necessary to ensure lines overlap with other diagonal lines @@ -954,7 +953,7 @@ class CreateDrawing(bpy.types.Operator): for path in el.findall("{http://www.w3.org/2000/svg}path"): 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()] + coords = [[float(o) for o in co[1:].split(",")] for co in subpath.split()] if coords[0] != coords[-1]: has_open_paths = True line_strings.append(shapely.LineString(coords)) @@ -1018,7 +1017,7 @@ class CreateDrawing(bpy.types.Operator): for path in el.findall("{http://www.w3.org/2000/svg}path"): for subpath in path.attrib["d"].split("M")[1:]: subpath_co = "M" + subpath.strip(" Z") - coords = [[round(float(o), 1) for o in co[1:].split(",")] for co in subpath_co.split()] + coords = [[float(o) for o in co[1:].split(",")] for co in subpath_co.split()] if subpath.strip().lower().endswith("z"): coords.append(coords[0]) if len(coords) > 2 and coords[0] == coords[-1]: