FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bonsai(drawing): join mitred wall/slab linework by actual layer materials, not LayerSetName by BIMvoice · Pull Request #8633 · IfcOpenShell/IfcOpenShell · GitHub

bonsai(drawing): join mitred wall/slab linework by actual layer materials, not LayerSetName - #8633

Open
BIMvoice wants to merge 1 commit into
v0.8.0from
fix-6274-wall-join-2d
Open

bonsai(drawing): join mitred wall/slab linework by actual layer materials, not LayerSetName#8633
BIMvoice wants to merge 1 commit into
v0.8.0from
fix-6274-wall-join-2d

Conversation

Copy link
Copy Markdown
Contributor

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.

…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bonsai - wall joins in 2d - only brick is contiguous

1 participant


Back | FazBrowse Home | New Git URL