Repository navigation
fix: edge use, face and shell destruction notifications and attribute cleanup (#556) - #631
Merged
bherbruck merged 5 commits intoOct 23, 2026
Conversation
…abs#556 follow-up) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TYEpC4tUKxEP3MCaFL5Kz2
…fications (tangency-labs#556) - edgeuse::p2::destroy (~SmEdgeuse), face::p3::destroy (~SmFace) and shell::destroy (~SmShell): SM_NO_DESTRUCTION through the object's context (status ignored, Unported propagates), the record dropped with what it owns, then ~SmAObject's ClearAttributes. edge::with_object_context is shared with edge::destroy. - brep_p4: DeleteEdge's edge uses and merged-away face, DeleteVertex's vertex shell. brep_p5: GlueVertices' shells. brep_p3 DeleteFace now deletes what upstream deletes there: the easy branch's edge uses (it only unlinked them), the other shell of a region merge, the emptied shell and the last new shell of the nesting pass; destroy_face also clears the face's attributes. - difftest: the brep_p3 recorders count SM_NO_DESTRUCTION per caller kind (edge, edge use, face, shell); DeleteFace records end with the four counts. All 90 delface cases agree (23 failed with only the brep_p4 changes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TYEpC4tUKxEP3MCaFL5Kz2
…faces-edgeuses-shells
…logy.brep_p4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TYEpC4tUKxEP3MCaFL5Kz2
…faces-edgeuses-shells
embed-3d
marked this pull request as ready for review
October 23, 2026 17:26
oursland
added a commit
to oursland/solidcore
that referenced
this pull request
Oct 23, 2026
Picks up tangency-labs#599 (G3 runner handles) and tangency-labs#631 (face/edge-use/shell destructors), so the PR's plan statuses and case set match the base commit whose reports the ratchet will use. Local checks after the merge: cargo fmt --all --check, cargo clippy --workspace --all-targets -D warnings, cargo test -p difftest --lib (53 passed). Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
The rest of #556, after #628 (edges, merged). Rust now runs the destructors that send
SM_NO_DESTRUCTIONwhere it deletes their records, each followed by~SmAObject'sClearAttributes.Changes
Notify(SM_NO_DESTRUCTION, this, NULL, NULL)through the object's context (GetContext(): the environment's context, else the kernel's). The notification status is ignored;Unportedpropagates. Then the record is dropped with what it owns, andClearAttributesruns.topology::edgeuse::p2::destroyfor~SmEdgeuse(SmEdgeuse.cpp:74)topology::face::p3::destroyfor~SmFace(SmFace.cpp:87)topology::shell::destroyfor~SmShell(SmShell.cpp:47)edge::destroyfrom fix: edge destruction notification and attribute cleanup in DeleteEdge / GlueEdgesGeneral (#556) #628 now shares the context binding (edge::with_object_context).brep_p4:DeleteEdge: its edge uses and the face a manifold delete merges away.DeleteVertex: its vertex shell.brep_p5: the shellsGlueVerticesdeletes.brep_p3DeleteFacenow deletes what upstream deletes (SmBrep.cpp:7072-7546):delete pEU; delete pEUMate)delete pOtherShell)delete pShell)delete pLastNewShell)destroy_facenow also clears the face's attributes.ClearAttributes. The whole-B-repdestroyis unchanged. Both are documented inbrep::p4's module docs.Native comparison
The
topology.brep_p3recorders (shim and runner) countSM_NO_DESTRUCTIONper caller kind: edge, edge use, face and shell.DeleteFacerecords end with the four counts.delfacecases agree.brep_p4changes, 23 failed (edge use 8 vs 4, shell 2 vs 1, …). After the firstDeleteFaceround, 3 still failed on the last-new-shell deletion, now fixed.Tests
edgeuse_shell_and_face_destructors_notify_and_clear_attributesuses a wire edge use, its wire shell and a face, all sharing one reference attribute with a surviving edge:Difftest (macOS arm64, pinned
c9c5979)Full run over every green/partial unit except
topology.brep_data(macOS hang, #450), compared unit by unit with main's CI reports (run 39982203560,b35cd5ac7):geom.hash_tableandheal.heal_data_p1/p2/p3fail because upstream's(ULONG)doubleUB saturates instead of wrapping #448, Upstream use-after-free inSmBSplineCurve::DeformToEndPointTargets(SmBSplineCurveNLib.cpp:3138) makescurve.curve_p6/nurbs.b_spline_curve_n_libdeform cases fail on macOS #449, difftest on macOS: libc++istreamextraction breaks the ASCII-reader units (database_io abort, brep_data hang, srf_in_volume read_db) #450), which fail identically on unmodified main.After merging main
246172b5e:Also run:
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, the same with-p difftest --features cpp,cargo test -p solidcore(2063) and the wasm check. No tolerance or guard changed.Overlap: #613 and #335 edit other hunks of
brep/p3.rs,p4.rs,p5.rsandshell.rs(stitch_faces,stitch_and_orient, ray-world code).🤖 Generated with Claude Code
https://claude.ai/code/session_01TYEpC4tUKxEP3MCaFL5Kz2