Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
…ctor members RegisterExistingSSI, CheckForSqueezeVertices, DeleteFaces, FixGaps, RemoveRelationship, IntersectInsertRelate, IntersectTopology, SetRelationships, FixupClassMates, FixupSplitVertexPair, EdgeEdgeIntersect, EdgeFaceCoincidence. Wires the RemoveRelationship back-edge of proto_topology_p3's GlueCoincidentBrepVertices through a Mates trait. Harness not written yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
Part 2's ops (41-51) run on part 1's two-B-rep script: the p2 shim includes p1's with an extension hook, the p2 binding extends p1's validation, and the shared interpreter dispatches part 2's ops. RegisterExistingSSI (op 16) now runs the port instead of the runner's emulation; SmTsectCurveType codes are bounded to the enum (0-6) and unknown codes are harness errors. Stubs carry every upstream argument with the defaults passed explicitly. First run: 834 cases, 657 pass, 0 fail, 177 deferred. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
|
Heads-up from #211 (
No behaviour change for existing callers. Happy to drop both from #211 if you'd rather do them differently; I'll re-merge your branch as it moves. 🤖 Generated with Claude Code |
…, exact guards, fuzz fixes - check_for_squeeze_vertices_into appends to the caller's lists as upstream's out-params do (the first conflict block appends, the second can still return SM_ERR), with check_for_squeeze_vertices as a wrapper; suggested by oursland for tangency-labs#211 (MergeCurveClasses keeps going after a failure), re-implemented here. - Stubs carry every upstream argument with the defaults passed explicitly (DeleteFace, DeleteEdge, GetFaces, Point3DClassify). - FixGaps: NER of both mates before the vertex casts, as upstream. - Shim/runner: the B-rep guards of FixGaps and CheckForSqueezeVertices are exact (only where a combination would run); IntersectInsertRelate needs a positive tolerance and coordinates below 1e154 (the full C++ intersection does not finish otherwise: 3 fuzz timeouts; the port defers it anyway). - p1 runner: no panic on a surface without knots (fuzz). - UB-169, WR-170; proto_topology_p3 notes: RemoveRelationship wired. difftest 835 cases, 655 pass, 0 fail, 180 deferred; FUZZ-PASS 2000. Co-authored-by: Jacob Oursland <jacob.oursland@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
|
@oursland thanks, I've taken both in ecd4ebd. 🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
…xact guards) - FixupSplitVertexPair: upstream bounds the other classification's index+1 write by the B-rep one's size; skip it past a shorter other one (it lands in SmTArray's spare slots and RemoveAt hides it). Case split_oob. - UB-175 [PSIRT]: ~SmProtoTopologyManager frees proto edges before the vertices that still list them (closed edges are listed twice, DD1), so ~SmProtoVertex reads freed memory. The shim runs a verbatim copy of IntersectInsertRelate that unlinks the stale entries before the delete and answers -2; the port detects it and returns InvalidInput. The shim's own manager teardown unlinks them too (lesson 23). Valgrind: 19 op-47 and control programs clean. - FixGaps: NaN-safe `!(dist < tol)` as upstream. - IntersectInsertRelate hang guard narrowed to tolerance 0 (HANG-25); negative and tiny positive tolerances run. - CheckForSqueezeVertices: the other vertex's B-rep mate is checked only where the second block dereferences it; SetRelationships without maps is refused only for a definition with both finals (shim, runner and FFI). - UB-169 text: the three outcomes (null deref, zeroed slot, next pair's curves). - Difftest 841 cases, 659 pass, 0 fail, 182 deferred; FUZZ-PASS 2000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
Cite upstream commit c9c5979 on the verbatim IntersectInsertRelate copy, note the squeeze guard's combining-first-block assumption (re-check when topology.brep_p5 lands) and the UB-175 detection's scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
…_intersector_p2 plan/upstream-issues.md: keep main's HANG-21/HANG-22 and append HANG-25. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
Main's shell-state export/import (topology.shell) makes the imported B-reps carry shell members, vertex-use lists and face-use links: 841 cases, 657 pass (655 real), 0 fail, 184 deferred (brep_p9 7 -> 9). Census and report updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
MergeAddedTopology drives the intersector, so it works on handles like TopologyIntersector: the B-rep is read and edited through a new MergeBrep trait (an IntersectorBrep plus the B-rep, face and SmStitch calls the merge makes, one method per upstream function). Methods whose unit is not ported default to Unported with UNPORTED tags; the three topology_intersector_p2 calls are private stubs shaped like tangency-labs#203's API. Everything after each stub is ported, including the culling, the vertex/edge/face gluing phases with their re-mating, region nesting and orientation. The intersector tolerance and the B-rep editing flag are restored on every exit (SmTemporaryChangeValue). Upstream's header declares bDoGluing before the four flags while the definition takes it after them; MergeAddedOptions::default is what the declared defaults actually pass. Constructor min/max now use min2. Unit tests cover the orientation macro, option defaults, constructor branches and MergeEdge's null fast path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… exactly Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
- surface.cone_p3: rejected_* cases now execute the Rust intersection (result ignored) so a Rust panic or hang on native-crash inputs fails. - Remove the extra blank line after the use block (rustfmt). - ellipse p2: the set-up stall bound is about 2^61 (~2.3e18) degrees, matching the code comment and HANG-23; correct the stale test message. - Renumber UB-175 to UB-179: open PR tangency-labs#203 already claims UB-175. - STATUS.md: trim a triple blank line and update the tangency-labs#207 wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to boolean.topology_intersector_p3 tangency-labs#203 adopted check_for_squeeze_vertices_into; its side is taken for p2.rs, its notes for the unit, and its additions to the p1 runner's shared items. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks @bluecmd for this port. I reviewed head What I checked
Gates (all pass): fmt, clippy Extra adversarial cases. I ran 542 hand-written cases, kept locally and not pushed. 343 of them compare values.
Results: Nits (optional)
🤖 Generated with Claude Code |
|
Thanks @bherbruck for the thorough review and the extra adversarial cases. I'll leave this head as approved and send both nits as a small follow-up PR after merge: the 🤖 Generated with Claude Code |
…_intersector_p2 crates/solidcore/src/boolean/topology_intersector/p1.rs: take main's side (tangency-labs#155 moved GlueEdgesGeneral behind IntersectorBrep and dropped the stub). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
…p_glue_edges_general tangency-labs#155 (topology.brep_p7) replaced part 1's GlueEdgesGeneral stub with a trait method. EdgeFaceCoincidence now calls it (pInsideFaceuses NULL, as upstream) and takes the kernel mutably. The call sits behind SmFace::GetBrep (topology.face_p4), so no case reaches it yet. Difftest unchanged case by case apart from iir_negative_tol / iir_tiny_tol, which now defer at SmBrep::GetMinEdgeBBoxSize (topology.brep_p2) instead of topology.brep_p1: 841 cases, 657 pass, 0 fail, 184 deferred. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5
|
Merged main to resolve a conflict. The only other change is the compile adaptation it needs: 🤖 Generated with Claude Code |
Port of
boolean.topology_intersector_p2: part 2 ofSmTopologyIntersector.cppinboolean::topology_intersector::p2. It covers 12 functions:RegisterExistingSSI,CheckForSqueezeVertices,DeleteFaces,FixGaps,RemoveRelationship,IntersectInsertRelate,IntersectTopology,SetRelationships,FixupClassMates,FixupSplitVertexPair,EdgeEdgeIntersectandEdgeFaceCoincidence. The two constructors were co-ported in #146.Builds on main's #146 (part 1). Calls into units with open PRs by others go through
UNPORTEDstubs:topology.face_p4#134,topology.brep_p1#145,brep_p3,brep_p4#173,brep_p5#194,brep_p7#155,query.face_p1#105 andface_p3#139. Nothing of theirs is re-implemented here. #211 (boolean.topology_intersector_p3, oursland) builds on this branch. Hischeck_for_squeeze_vertices_intois taken here, re-implemented, with him as co-author.Difftest
no_valuescases are scripts cut at op 0 (cases_both_errored), so there are 657 real passes.IntersectInsertRelateprogram that builds proto edges. The pre-review found an upstream use-after-free in~SmProtoTopologyManager(UB-175 [PSIRT], below). After the fix, valgrind runs clean (0 errors) on 19 programs: 12 generated op-47 programs, including the three that had failed, plus theiir*,intersect_topologyand new edge cases. Both the C++ and the Rust side run in the same process.CheckForSqueezeVertices: 76 successes have no conflicting mate (empty lists). A conflict that combines vertices defers.DeleteFaces: all 68 successes have an empty face list.FixGaps: 119 successes find no gap pair. A pair that combines defers.SetRelationships: 39 successes, all on managers without definitions.EdgeEdgeIntersect: 129 successes, none of which splits. A split defers onbrep_p9.EdgeFaceCoincidence: 128 successes, none of which imprints.RemoveRelationship: 28 successes, 36SM_ERR.CheckForSqueezeVertices: 25SM_ERR(the existing relationship is better).FixGaps: 14SM_ERR_NULL_POINTER(a gap pair with an unmated vertex).FixupClassMates: 54 successes on 0 to 3 intervals, 19SM_ERR(sizes differ).FixupSplitVertexPair: 56 successes, 6 of which remove the interval (one with a shorter other classification,split_oob).IntersectTopologyandIntersectInsertRelateboth start withSmBrep::GetFaces(topology.brep_p1). Their tails are ported in full behind the stub.The ignored test
units::boolean_topology_intersector_p2::tests::censusreproduces these counts.Changes outside the unit
SC_TI_EXTRA_OPShook (ops 41 to 51). The p2 FFI binding extends p1's validation throughExtraOps. p1's runner interprets part 2's ops. p1's own build and difftest are unchanged.RegisterExistingSSI(op 16) in p1's script now runs the port instead of the runner filling the table directly.SmTsectCurveTypeis bounded to 0–6 in the FFI. An unknown code is now a harness error; it used to map silently toUnknown.RemoveRelationshipintopology::proto_topology::p3(GlueCoincidentBrepVertices). Theother_mateclosure is replaced by aMatestrait.TopologyIntersectorpasses its maps (MapMates);NoMatesis for no maps.IntersectInsertRelate(op 47) needs a nonzero tolerance (HANG-25:0and-0hang; negative and tiny positive ones run) and coordinates below 1e154 (HANG-16's class). The port defers op 47 in every case, so the guard removes no compared case.CheckForSqueezeVerticesandSetRelationships(no maps) guards now refuse only where upstream dereferences.IntersectInsertRelate. It unlinks the stale proto-edge entries before the delete and answers-2; the port detects the same condition and returnsInvalidInput. The shim's own manager teardown unlinks them as well.RegisterExistingSSIleaves the table out of step. The text is rewritten with its three outcomes.IntersectInsertRelateat tolerance 0.UNPORTED tags
topology.brep_p1(SmBrep::GetFaces),topology.brep_p3(DeleteFace),topology.brep_p4(DeleteEdge/DeleteVertex),topology.brep_p5(CombineCoincidentVertices) andquery.face_p1(SmFace::Point3DClassify). All their units aretodowith open PRs.topology.face_p4(GetEdges/GetVertices/GetBrep),topology.face_p3(FaceIntersect),topology.brep_p5(MakeEdgeInFace) andtopology.brep_p7(GlueEdgesGeneral).UNPORTED(boolean.topology_intersector_p2)RemoveRelationshipin proto_topology p3, now wired.Status (updated 2026-10-19 08:19 UTC)
118041e6;9286f181adds the 3 comment minors. The merge of main@86f2d3bd (ffi: share the validate Reader through solidcore_ffi::reader #186), checked CLEAN at29b12286, is pushed as0d8b1028.~SmProtoTopologyManager, guarded) and HANG-25 (IntersectInsertRelateat tolerance 0).UNPORTEDstubs. port: boolean.topology_intersector_p3 #211 builds on this branch.19c58b4c, with one required compile adaptation explained in the PR comments (p2 now calls port: topology.brep_p7 #155'sbrep_glue_edges_general). The optional nits, plus wiring the now-mergedtopology.brep_p1stubs, go into a follow-up PR after this merges.🤖 Generated with Claude Code
https://claude.ai/code/session_01VhgnDJqMfisAk17esFqRL5