Repository navigation
Port BIMForge's excavation review fixes: restored ground, limit extents - #1
Merged
Merged
Conversation
Before its dig, a hosted cut restores only its host's ground: the section fill is clipped to the host's uncut section (developed / cross sections, and the Blender add-on, whose Solid fill is clipped too), so a cut reaching past grade no longer fills air. Drawing extents take in the limit lines. developed.py matches BIMForge 0.1.100's copy; its new tests come along. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
There was a problem hiding this comment.
🟡 Changes recommended
Hosted cutters can incorrectly fill soil outside their hosts, while excluding restored bodies from beyond-plane visibility can hide valid ground in pre-dig views.
2 open issues
What changed in this PR
Ports BIMForge’s excavation fixes into IfcSection’s section drawing and Blender add-on paths, keeping restored ground within its host and including excavation limits in drawing extents.
Changes:
- Clips hosted excavation fills to the host’s uncut section while preserving whole restoration for unhosted bodies.
- Shares section-cut processing and includes excavation limit lines in extent calculations.
- Adds regression tests and documents the fixes.
| File | Description |
|---|---|
| tests/test_developed.py | Adds host-clipping and excavation-extent regression tests. |
| tests/blender/test_alignment_section.py | Tests pre-dig restored ground clipping in Blender. |
| src/ifcsection/developed.py | Adds host-clipped restoration, shared cut processing, and limit-aware extents. |
| src/ifcsection/addon.py | Caches uncut host geometry and clips excavation fills. |
| CHANGELOG.md | Documents the ported excavation fixes. |
Review effort: Balanced
When the plane cut a hosted cut but not its host, _clip_to_host returned None and the caller filled the whole cut: soil drawn outside the ground, in the pre-dig view and in Solid mode. Return no rings there, as the DXF path (developed._cut_into) already skips a Restore with no host region. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
BrandonLewis
added a commit
that referenced
this pull request
Nov 5, 2026
BrandonLewis
added a commit
that referenced
this pull request
Nov 5, 2026
Before the dig, the edges beyond a section showed the ground with its hole already dug, and a ground solid wholly behind the plane that its cut removes vanished. A host whose every void is still to dig is now drawn beyond the cut as its uncut shape, in place of its voided body. No 3D boolean. Raised in the review of #1. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
This was referenced Nov 5, 2026
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.

Summary
Ports the fixes from BIMForge PR BrandonLewis/BIMForge#8's review (released in BIMForge 0.1.100):
developed.py): the restored fill is clipped to the section of the host's uncut shape (Clip/Restore,_uncut,_cut_into)._cut_featuresnow carries each hosted cut's uncut host, and_clip_to_hostclips the pre-dig fill, and Solid mode's volume-removed fill, to it in 2D._extent).developed.pynow matches BIMForge's copy, except one line of IfcSection wording.Test plan
Element.voids: 64 passed.test_developed.py18 passed, 2 skipped (thevoidstests). BIMForge 0.1.100 carriesElement.voids, so CI runs them once it is on PyPI.test_restored_ground_stays_inside_its_host(sections, and the Blender add-on) andtest_the_extent_takes_in_the_limits_of_excavation.Generated by Claude Code