…ials, not LayerSetName (#6274)
The default drawing join criteria compared IfcMaterialLayerSetUsage
via "material.Name", which for layered walls resolves to the optional
IfcMaterialLayerSet.LayerSetName attribute. Two walls with an
identical layer composition (same materials, same thicknesses) can
still have a different or unset LayerSetName depending on how the
material was assigned (direct instance override vs wall type), which
made the 2D cut linework merge fail and left a spurious seam line at
mitred or butt joins even though the walls share the same material.
Switch to "materials.Name", which resolves the actual list of
constituent material names via ifcopenshell.util.element.get_materials,
so two elements are only treated as different when their real material
composition differs. The redundant "Material.Name" entry is removed,
since it never resolved to anything (get_element_value only recognizes
the lowercase "material"/"materials" keys), so it was silently
matching None for every element.
Verified live in headless Blender 5.2 against the reporter's attached
Wall joins & visualisation.ifc: before the fix, the mitred wall pair
(GUIDs 1KtMvpwxL5PwkIhx8XA6Ro and 1EzeyHDj98PhTMAOhx02Zi, both a
brick+concrete layered wall) rendered as two separate SVG groups with
a visible internal seam. After the fix they merge into a single group
with no seam, and unrelated walls that only coincidentally shared an
unset LayerSetName no longer get incorrectly merged together either.
Generated with the assistance of an AI coding tool.
Problem
Mitred or butt-joined walls that share the same material composition still show a spurious seam line in 2D drawing output, instead of merging into continuous linework.
Root cause
The default drawing join criteria compared IfcMaterialLayerSetUsage via material.Name, which for layered walls resolves to the optional IfcMaterialLayerSet.LayerSetName attribute. Two walls with an identical layer composition (same materials, same thicknesses) can still have a different or unset LayerSetName depending on how the material was assigned (direct instance override vs wall type), which made the 2D cut linework merge fail.
Fix
Switch to materials.Name, which resolves the actual list of constituent material names via ifcopenshell.util.element.get_materials, so two elements are only treated as different when their real material composition differs. Also removed a redundant Material.Name entry that never resolved to anything (get_element_value only recognizes the lowercase material/materials keys), so it was silently matching None for every element.
Testing
Live-verified in headless Blender 5.2 against the reporter's attached Wall joins & visualisation.ifc: before the fix, the mitred wall pair (a brick+concrete layered wall) rendered as two separate SVG groups with a visible seam; after the fix they merge into one group with no seam. As a bonus, unrelated walls that only coincidentally shared an unset LayerSetName no longer get incorrectly merged together either.
Fixes #6274.
Generated with the assistance of an AI coding tool.