Repository navigation
Draw ground still to dig beyond the cut; make the 4D back buttons step back - #2
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
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
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
There was a problem hiding this comment.
🟡 Changes recommended
The whole-Clip path bypasses the host’s standing-state filter, making unbuilt or already removed hosts visible when all excavations remain undug.
1 open issue
What changed in this PR
Ports BIMForge’s pre-dig ground visibility fix, extending the restoration work from PR #1 to edges beyond section and elevation planes.
Changes:
- Draws hosts uncut beyond the plane when all their voids are still undug, leaving mixed dug/undug hosts unchanged.
- Adds a regression test for fully excavated ground lying beyond the section plane.
- Documents the fix in the changelog; Blender viewport behavior is unchanged.
| File | Description |
|---|---|
tests/test_developed.py |
Adds optional fixture spans and tests beyond-cut visibility before and after excavation. |
src/ifcsection/developed.py |
Tracks voided hosts and selects uncut replacements for beyond-cut drawing. |
CHANGELOG.md |
Documents the pre-dig visibility fix and its scope. |
Review effort: Balanced
Port of the BIMForge fix: an undug cut restored ground, and a whole Clip drew the host beyond the cut, even when the host's own schedule had it not yet placed or already removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
Each date-step button set only one of `event` / `days`, and Blender gives an operator's unset, saved properties their last-used values: after "next event", the -1 day and -7 day buttons ran with event=+1 and jumped forward to the next event. Mark both SKIP_SAVE and set both on every button. 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
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
1. Ground still to dig draws beyond the cut (port from BrandonLewis/BIMForge#10). This fixes the finding left open in the review of #1, on
_drawnindeveloped.py. Before the dig date:The fix: when every void of a host is still to dig, the host is drawn beyond the cut as its uncut shape, in place of its voided body. No 3D boolean is needed. A host with some voids already dug draws as before. A host that isn't standing at the date (placed later, or already removed) restores nothing, which addresses the Copilot finding on this PR.
developed.pyagain matches BIMForge's copy, apart from the module-path wording.2. The 4D back buttons step back. In the section panel, the date-step buttons each set only one of the operator's
eventanddaysproperties. Blender gives an operator's unset, saved properties their last-used values, so after next event the −1 day and −7 day buttons ran withevent = +1and jumped forward to the next event. Both properties are nowSKIP_SAVE, and every button sets both.The Blender viewport otherwise is unchanged. It shows Bonsai's meshes, not
developed.py.Test plan
test_ground_still_to_dig_draws_beyond_the_cutfails on main (0 == 104) and passes here. It also covers ground placed after the view date.test_the_date_filter_hides_what_is_not_built_and_skips_its_cutnow asserts both step properties are skip-save, and fails without the fix. A scriptedbpy.opscall doesn't inherit last-used values, so the property flag is what the test checks.🤖 Generated with Claude Code
https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu