mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
@@ -1470,6 +1470,9 @@ class CreateDrawing(bpy.types.Operator):
|
||||
classes.add(el.attrib["{http://www.ifcopenshell.org/ns}guid"])
|
||||
is_closed_polygon = False
|
||||
for path in el.findall("{http://www.w3.org/2000/svg}path"):
|
||||
# Temporary hack.
|
||||
if "d" not in path.attrib:
|
||||
continue
|
||||
for subpath in path.attrib["d"].split("M")[1:]:
|
||||
subpath_co = "M" + subpath.strip(" Z")
|
||||
# Round due to inaccuracies from Blender meshes and bisection
|
||||
|
||||
@@ -2492,6 +2492,11 @@ class Drawing(bonsai.core.tool.Drawing):
|
||||
paths = element_g.findall(f"{SVG}path")
|
||||
|
||||
for path in paths:
|
||||
# For some reason `<path/>` without "d" attribute can occur too. See #6871.
|
||||
# It's unclear whether this issue is still present with the updated ifcopenshell core,
|
||||
# but adding this fix for now. Could be reveted later.
|
||||
if "d" not in path.attrib:
|
||||
continue
|
||||
path = path.attrib["d"]
|
||||
|
||||
if not re.match(MULTI_POLYLINE_PATTERN, path):
|
||||
|
||||
Reference in New Issue
Block a user