Repository navigation
feat(analytical): PanelsBySolid source evidence record, rebound by SnapToJunctions (Q4) - #230
Merged
michaldengusiak merged 4 commits intoNov 4, 2026
Conversation
…SnapToJunctions rebinds (Q4) Producer half of the contact-aware void guard (design rev 5). A panel carries an optional, all-or-nothing SourceEvidence record: the panel's frame at extraction, the guaranteed slab thickness, the Support region where that slab is proved to be material, the panel's Origin face, and the BoundFootprint the panel had when an evidence-aware SAM tool last wrote it. - Create.PanelsBySolid certifies material only for closed, valid, layered prismatic solids: closure by edge pairing, positional (metres, not angular) parallel/perpendicular classification, one section per layer, definite-result intersections. Anything else gets no record, so behaviour is unchanged. - Panel saves and reloads the record; every copy of a panel carries it. - Query.ValidSourceEvidence accepts a record only while its frame equals the panel's and the panel's footprint equals BoundFootprint, so a same-plane edit makes it stale. - Query.SnapToJunctions rebinds only a record that is valid on the input panel, to the snapped footprint, and drops any other, so stale evidence cannot become valid by snapping back to the bound footprint. The SAM_OCCT consumer is a separate change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Panels and their copies share one SourceEvidence instance, and its public FromJsonObject could overwrite the certified thickness or support of all of them without going through the rebinding check. FromJsonObject is now an explicit interface implementation that always refuses; the JSON constructor is the only reader. The regions and frame the record returns were already copies. Regression tests: overwriting a panel's record (and the one the validity query returns, and a copy's) through the JSON reader changes neither the panel nor its copy; regions and frame handed to a caller are copies; a record is still read by Core.Create.IJSAMObject<SourceEvidence>. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
michaldengusiak
marked this pull request as ready for review
November 4, 2026 09:55
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.
Draft for owner review. SAM producer half of design rev 5 (contact-aware void guard); the SAM_OCCT consumer is a separate PR (SAM-BIM/SAM_OCCT#89). Until both land nothing changes for users: no existing code reads the record.
What it does
PanelsBySolidstamps an optional, all-or-nothingSourceEvidencerecord on host panels (frame, guaranteed thickness,Support,Origin,BoundFootprint), only for closed, valid, layered prismatic solids (closure by edge pairing, positional metre-based classification, one section per layer, definite-result intersections). Any other solid gets no record, so behaviour is unchanged.Panelsaves, reloads and copies the record.Query.ValidSourceEvidenceaccepts it only while its frame equals the panel's and the panel's footprint equalsBoundFootprint, so a same-plane edit makes it stale.Query.SnapToJunctionsrebinds a record that is valid on the input panel to the snapped footprint and drops any other, so stale evidence cannot become valid again by snapping back to the bound footprint.6eddd56d): panels and their copies share one record, andFromJsonObjectwas public.SourceEvidenceis now immutable once constructed:IJSAMObject.FromJsonObjectis explicit and always refuses; the JSON constructor is the only reader; returned regions and frame are copies.Tested
6eddd56d98ac9f19f613481b923f0b90096f470b; final head1aa1c3a227c49513ef3d85cb2eb203ba303dc7b9(record-only docs commit on top). GitHub checks at this head (read from the logs): Release build, SPDX and ReleaseSAM.Testsall passed, 4020/4020 (build, tests).dotnet test SAM/SAM.Tests/SAM.Tests.csproj --no-build: 4020 passed, 0 failed, 0 skipped (39 new inPanelsBySolidSourceEvidenceTests). Existing tests unchanged.SourceEvidence.cs; letting snapping carry a stale record fails the stale-then-snap test.aeafa38f, hosted (owner-reported): Release build and SPDX passed, ReleaseSAM.Tests4017/4017.SAM.Core.Grasshopper.Tests, the Softthouse N0/N1/N2 chain and census.Record:
documentation/PanelsBySolid-SourceEvidence-Q4.md. Merge order: SAM first. Marked ready for review at1aa1c3a2after the owner verified the fix and the hosted checks. Not merged, not approved.🤖 Generated with Claude Code