Conversation
In merge_linework_and_add_metadata every closed subpath of an element group was queued with a reference to the same class set, so when one subpath was unioned with a neighbouring element the in-place polygon_classes.update() also rewrote the classes of that element's other, geometrically unrelated subpaths. A wall split by an opening could therefore emit a piece carrying a neighbour's GlobalId, status and metadata classes, styling it from the wrong CSS rules. Queue a copy of the class set per polygon so each merged polygon owns its own classes. Generated with the assistance of an AI coding tool.
This was referenced Jul 20, 2026
Member
|
This is worth landing, and #9493 raises the stakes on it a little. That PR lets a material layer's cut merge with a non-layered element of the same material (a slab's concrete layer reading continuous into a concrete footing), so more cuts end up in the same bucket than before, and buckets with several members become common rather than exceptional. The shared class set fixed here is exactly what gets copied around in that case — so the leak this fixes goes from occasional to routine. They're independent changes and either can land first; just flagging that this one becomes more valuable once #9493 is in, rather than less. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
merge_linework_and_add_metadataevery closed subpath of an element group was queued with a reference to the same class set, so when one subpath was unioned with a neighbouring element the in-placepolygon_classes.update()also rewrote the classes of that element's other, geometrically unrelated subpaths. A wall split by an opening could therefore emit a piece carrying a neighbour's GlobalId, status and metadata classes, styling it from the wrong CSS rules. Queue a copy of the class set per polygon so each merged polygon owns its own classes.Demonstrated with the exact loop code — a disjoint piece belonging only to element B was emitted carrying element A's guid:
Test plan
Verified live in headless Blender against four generated multi-layer-wall models (real
IfcMaterialLayerSet+IfcMaterialLayerSetUsage, walls straddling the cut plane, some voided by openings), driven through the realbim.create_drawingpipeline: path geometry byte-identical before and after, and class sets identical, so unaffected drawings render the same. black+ruff clean.Relationship to #7369
Relates to #7369, but does not close it. That issue's own reported symptom (material layers merging into one group) was already fixed by #7700 — I could not reproduce it on current v0.8.0, and temporarily reverting the single line #7700 added (
"Material.Name"injoin_criteria) reproduces it exactly, including the two-layer-materials-in-one-group signature from the reporter's devtools screenshot. This PR fixes a separate, still-live defect found in the same merge loop.This PR contains AI-generated code, generated with the assistance of an AI coding tool.