mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Fix #2799. Drawing polygon merging now is purely material based.
This commit is contained in:
@@ -516,9 +516,9 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
classes.append(f"material-{material_name}")
|
classes.append(f"material-{material_name}")
|
||||||
el.set("class", (el.get("class", "") + " " + " ".join(classes)).strip())
|
el.set("class", (el.get("class", "") + " " + " ".join(classes)).strip())
|
||||||
|
|
||||||
# Don't join everything. To start with, let's focus on walls and slabs.
|
# Drawing convention states that objects with the same material are merged when cut.
|
||||||
if element.is_a("IfcWall") or element.is_a("IfcSlab") or element.is_a("IfcCovering"):
|
if material_name != "null":
|
||||||
joined_paths.setdefault(element.is_a() + material_name, []).append(el)
|
joined_paths.setdefault(material_name, []).append(el)
|
||||||
|
|
||||||
for key, els in joined_paths.items():
|
for key, els in joined_paths.items():
|
||||||
polygons = []
|
polygons = []
|
||||||
|
|||||||
Reference in New Issue
Block a user