Skip to content

port: topology.brep_p2 - #149

Merged
bherbruck merged 70 commits into
tangency-labs:mainfrom
bluecmd:unit/topology.brep_p2
Oct 20, 2026
Merged

bherbruck merged 70 commits into
tangency-labs:mainfrom
bluecmd:unit/topology.brep_p2

Conversation

@bluecmd

@bluecmd bluecmd commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Ports unit topology.brep_p2: the 23 SmBrep functions it owns in source/SMLib/src/SmBrep.cpp, as solidcore::topology::brep::p2.

What is in it

  • Queries: GetEdgeuses, GetShellVertices, IsManifoldSolid, IsSheet, IsOrientedSheet, GetMinEdgeBBoxSize.
  • Tolerance and trim curves: SetTolerance (SM_USE_OLDTOL), RebuildUVTrimCurves, sm_CheckAndFixUVTrimCurves, SwapUV, DeleteStaleCaches.
  • Notifications: Notify, sm_AddToSpatialTree, sm_RmFromSpatialTree. The SM_OC_BREP cache is held by the caller and passed to notify as a BrepCacheSlot.
  • Topology construction: MakeShellVertexTopology, MakeEdgeVertexTopology, MakeEdgeTopology.
  • Geometry and classification: ReplaceSurface, LocalCurveSector, RayFire, sm_GetPointFromSol, MergeCurvesOnSurface, MateLaminaEdgeToSurface.
  • Back-edges wired: SmBrep::Notify in topology::edge (topology.edge's deferrals on brep_p2 5 → 0) and in topology.brep_p6's TestClosureSplitRegion (PRE_EDIT, SPLIT_IN_BREP(old, old, new), statuses ignored, SmBrep.cpp:27954-5; the split API and heal_data_p1's fix_bad_sheets take the caller's NotifyEnv, see below), SetTolerance in heal.heal_data_p2 (and through it heal.heal_data_p1 / heal.heal_data_p3) and topology.trimming_tools, IsManifoldSolid in mass.integrator and query.api_queries. Passes against main: query.api_queries 648 → 773, heal.heal_data_p2 347 → 364, heal.heal_data_p3 267 → 314, heal.heal_data_p1 265 → 266; none of them defers on topology.brep_p2 any more.
  • Also wired: query::edge's stale EvaluateBinormalStepOff stub now calls topology::edgeuse::p2::evaluate_binormal_step_off_into (an in-place variant that keeps upstream's partially written out-params on failure). AreCoincidentMaybe in MergeCurvesOnSurface now calls intersect.curve_class_p7 (port: intersect.curve_class_p7 #65). ProtoTopologyManager::new's tolerance fallback (SmProtoTopology.cpp:3548-3556) now calls Brep::tolerance and brep::p2::min_edge_bbox_size: new() takes the kernel and each B-rep as (handle, &Brep), the proto_topology_p1 and query.face_p2 runners pass two empty Breps as their shims build two empty SmBreps, and 5 new proto cases (approx_tol 0, -1e-3, -1, 1e-13 and SM_EFF_ZERO) compare the branch. With the fallback disabled, the four proto cases below SM_EFF_ZERO fail. Only the tolerance half is compared against C++ in proto_topology_p1 (two empty B-reps never let the edge-size half win); since the main merge with port: boolean.topology_intersector_p1 #146, boolean.topology_intersector_p1's MgrNew op passes its two real runner B-reps too, and MgrNew now outputs the manager's GetTolerance, so the fallback value is compared: with tol = 3*min(..) mutated, 20 intersector p1 cases fail.
  • topology.face_p1 (port: topology.face_p1 #148, merged) wired: ReplaceSurface's SmFace::SetSurface (default bDeleteCurrFace FALSE) and RemoveUVTrimCurves call topology::face::p1::set_surface / remove_uv_trim_curves, and face_p1's MoveSeam calls brep::p2::replace_surface exactly as SmFace.cpp:17602 (ReplaceSurface(this, pJoinedSurface, FALSE, NULL, FALSE)). Every ReplaceSurface case still defers first at SmFace::Notify (topology.face_p3).
  • topology.shell (port: topology.shell #154) and topology.edgeuse_p3 (port: topology.edgeuse_p3 #117) wired: the 8 own shell sites of the Make*Topology functions (region shell-list PostInsert / Remove with its status ignored, IsVertexShell, the vertex shell's vertex use, the vertex / wire shell type and head, SER(TransferChildrenTo)), as SmBrep.cpp:18714 / 13799 / 13641; and the 3 MateLaminaEdgeToSurface sites (GetOrCreateUVTrimCurve copy and trim, NormalizedEvaluate(t, FALSE), header defaults). make_edge_topology takes the kernel; local_curve_sector / ray_fire take the B-rep mutably (port: topology.edgeuse_p3 #117's sectoring may make UV trim curves).
  • Make ops compare topology: the shim and runner output, after the status, the B-rep read back through fresh list queries (per region its shells as kind and vertex / first wire edge, per vertex its vertex-use count, per edge the vertices and shells of its primary edge use and that use's mate): 17 to 86 values per case instead of a status alone.
  • Back-edges into this unit after the merges (overseer rulings): topology.brep_p6's split takes env: &mut NotifyEnv<'_> (as do heal_data_p1's fix_bad_sheets); heal_data_p3's FixBadsheets step and the runners pass brep::p2::RegionNotifyState (an empty AttributeStore and default region records). The heal path carries no attribute state at any level, so SmSAGObject attribute propagation during healing is not modelled; this predates the PR and is recorded in plan/findings.md. topology.shell's ShellRayWorld::shell_ray_sector default is retagged UNPORTED(query.brep) (the B-rep-cache world overrides it with brep::p2::local_curve_sector).
  • Shared FFI reader (ffi: share the validate Reader through solidcore_ffi::reader #186, lesson 30): topology_vertexuse's FFI Reader is unit_reader!(MAX_COORD) and private again; the brep_p2 wrapper uses its own and reads blocks through vu::surface_at / curve_at / brep_block_at.

Builds on #145 (topology.brep_p1, head 5b1b28ae, which includes main through e1ae2640), merged in as-is; main is merged up to ca3f8c29. Calls into units that are not ported yet go through UNPORTED stubs: topology.face_p3 (#139), query.brep, query.face_p1 and intersect.curve_class_p2/p4. MergeIntervals is wired to intersect.curve_class_p5. Nothing owned by another open PR is co-ported.

SmBrep::Notify end to end (#210)

brep::p2::notify ports every arm of SmBrep::Notify (SmBrep.cpp) with all its arguments: PreEdit / Destruction delete the SM_OC_BREP cache, MergeInBrep removes d2 from the spatial tree, RmFromBrep removes d1, SplitInBrep adds d2 and d3 (when they differ from d1), AddToBrep adds d1, every other type is a no-op, and then SmSAGObject::Notify runs. With no cache slot the spatial-tree helpers return before any stub, so the no-cache path (every current Rust caller) has none. With a cache, the face branch stops at UNPORTED(query.face_p1) SmFace::CalculateBoundingBox and the cache rebuild at UNPORTED(query.brep); the code after those calls is ported. The 7 remaining UNPORTED stub sites in brep/p2.rs target todo units (topology.face_p3 3, query.brep 1, query.face_p1 1, intersect.curve_class_p2 1, intersect.curve_class_p4 1).

Review 5578349117 round (head 167dd352, main merged through 39ceb995)

  • All 33 UNPORTED(topology.brep_p2) sites main had are wired (685608d2), each with upstream's status handling.
  • p2.rs's own stubs into topology.face_p3 and the intersect.curve_class_p4 constructor are wired (02b28cd1).
  • The mismatches this exposed are fixed (660b3270, da779c51).
  • Every touched unit was re-run (863c5810): 229 units, 0 fail. The per-unit lines and the mapping to each must-fix are in the review reply. The other unit numbers in this description below predate this round; the review reply has the current ones.
  • Deviation (net): 3 offset.offset_geometry_creation cases that pass on main now defer to ANALYTIC_EXPORT: gen0119 and gen0707 on an SmSurfOfExtrusion, gen0376 on an SmSphere. On main they passed only because a brep_p2 stub stopped them before LiftCurve; past it, the C++ runs the subclass's iso-curve override, and the Rust SurfaceKind has no extrusion or sphere variant to import those faces as (issue Coordinate Kernel-aware Surface dispatch for analytic surface kinds #76 tracks that gap).
    • ed40f92c imports SmSurfOfRevolution faces exactly: the shim exports their binary WriteToDB record and the runner reads it back with SurfOfRevolution::read_from_db. The other 3 of the original 6 (gen0009, gen0148, gen0520) pass again, as does gen0683.
    • offset.offset_geometry_creation is now 861 cases, 552 pass (was 542), 0 fail, 309 deferred: 10 harness deferrals pass, 9 move to intersect.surface_drop_curve. --perturb SENSITIVE 552/552.
  • Known fuzz timeout (not a defect in this unit; no guard): offset.offset_geometry_creation --fuzz 2000 has 0 differs, crashes or panics and 1 timeout, fuzz00504. Its trim_extended_edge takes C++ about 2 s and Rust 18-24 s, against a 20 s budget. The time goes into rebuilding curve.curve_p5's curve cache on every call under global_curve_intersect, a documented deviation of that unit; this PR's wiring made the path reachable. It is recorded in plan/findings.md under curve.curve_p5 (3a6ea1df) and in COORD.md, and left to that unit's owners.
  • Fuzz differs (a note, not a failure): topology.brep_p2 --fuzz 2000 is FUZZ-PASS with differs=2. fuzz00488 and fuzz00815 are Mate with the plane's origin at ±9.2e18: status 1001 in C++ vs 1006 in Rust. The cause is in the plane's global_point_solve (surface_p4 / plane_p1), not brep_p2 logic. Both inputs are in plan/findings.md.
  • batch: land 5 reviewed-clean contributor PRs #283 merge round (a37776b1..167dd352): main's 5 new UNPORTED(topology.brep_p2) sites are wired, and merge_p4's ArenaPair implements brep_arena / BrepGlue. merge_p3's arena-only boolean_lists notifies its component copy through an arena-only store; this reverses port: boolean.merge_p3 #245's stated design (see the reply). Pre-review fixes are in 63997139 (region notification keys, p5 Deviations). The gate on 167dd352 has all 232 units at 0 fail; query.api_queries gains 42 passes and topology.brep_p7 gains 40.
  • Main's own breakages: offset_offset_executive_p1::each_highlevel_probe_calls_its_real_method and intersect_curve_class_p4::undefined_scripts_are_rejected fail on clean main too. They are not touched here and are listed in COORD.md.

Difftest

PARTIAL topology.brep_p2 cases=1709 passed=1437 failed=0 deferred=272 max_rel_err=0e0 with_values=1437 no_values=0 blocked_by=intersect.curve_class_p2(1),intersect.surface_drop_lib_p3(85),query.brep(93),surface.surface_cache_p1(20),topology.face_p2(19),topology.face_p3(16),topology.face_p4(38)
SENSITIVE topology.brep_p2 perturbed=1367 detected=1367 unperturbed=0 deferred=342
FUZZ-PASS topology.brep_p2 cases=2000 rejected=442 malformed=767 ran=791 differs=0 crashes=0 panics=0 timeouts=0

PARTIAL topology.brep_p7 cases=316 passed=197 failed=0 deferred=119 (the 51 topology.brep_p2 deferrals: face_p3 43, brep_p1 7, brep_p4 1)
PARTIAL topology.brep_p10 cases=1404 passed=851 failed=0 deferred=553 (12 IsManifoldSolid deferrals pass, 2 -> topology.face_p2)
PARTIAL heal.stitch_p1 cases=300 passed=206 failed=0 deferred=94 (unchanged)

PARTIAL topology.brep_p6 cases=498 passed=450 failed=0 deferred=48 (the 6 former SmBrep::Notify deferrals relabel to query.brep); SENSITIVE 450/450
PARTIAL heal.heal_data_p1 cases=493 passed=271 failed=0 deferred=222
PARTIAL heal.heal_data_p2 cases=738 passed=469 failed=0 deferred=269; SENSITIVE 469/469
PARTIAL heal.heal_data_p3 cases=474 passed=329 failed=0 deferred=145; SENSITIVE 329/329
PARTIAL boolean.topology_intersector_p1 cases=827 passed=710 failed=0 deferred=117 with_values=707 no_values=3; SENSITIVE 710/710
PARTIAL topology.edge cases=1787 passed=1781 failed=0 deferred=6; SENSITIVE 1781/1781
PARTIAL mass.integrator cases=1528 passed=1521 failed=0 deferred=7
PARTIAL topology.shell cases=911 passed=892 failed=0 deferred=19 (unchanged)
PARTIAL topology.vertexuse cases=2686 passed=2250 failed=0 deferred=436 (unchanged)
PARTIAL query.edge cases=1368 passed=1316 failed=0 deferred=52
PARTIAL topology.face_p1 cases=2312 passed=807 failed=0 deferred=1505
PARTIAL topology.proto_topology_p1 cases=1862 passed=1770 failed=0 deferred=92
PARTIAL query.api_queries cases=1203 passed=773 failed=0 deferred=430

sc-remote green: 208 units, failed=0
valgrind (--error-exitcode=99, harness/valgrind/ub11.supp): 74 sampled cases on the new paths (Make, IsSheet, Sector, Mate, SwapUV, Rebuild, the brep_p6 split, heal_data_p2, intersector MgrNew, topology.edge notify): 0 errors

Flips against the pre-merge round (7311346): 228 EvaluateBinormal → pass (Sector), 66 GetShells → pass (IsSheet / IsOrientedSheet), 76 shell stubs → pass (Make, compared topology), 74 → intersect.surface_drop_lib_p3, 38 SwapUV → topology.face_p4, 7 → topology.face_p2; 0 new fails or hangs. Of the 52 orientation-0 (SM_OT_UNKNOWN) sector fixtures 46 pass now.

The shim (harness/cpp/shim/topology_brep_p2.cpp) builds real SmBreps with the shared topology fixture: 15 upstream .smb files, a wire edge, a 10x10 plane face, and the my_test_topology wire network. It replaces analytic geometry by plain B-splines so the Rust import is exact, and registers the B-rep face, edge and vertex lists first, so the import order is upstream's list order. 1309 fixture cases (upstream test calls: SetTolerance smTopoTest.cpp:337 and :696, smMergeTest.cpp:1728; IsManifoldSolid smTopoTest.cpp:449; MergeCurvesOnSurface smTopoTest.cpp:1664) plus 400 generated cases with tiny and huge scales. The two file statics, which the shim cannot call, are covered by Rust unit tests.

Review of 0258c83: back-edges wired (at 8fdfa2c8)

No UNPORTED(topology.brep_p2) remains in the crate.

  • topology.brep_p7 (port: topology.brep_p7 #155): brep_notify → brep_p2::notify through glue_edges_general's env (PRE_EDIT with this, MERGE_IN_BREP (surv, del, this)), brep_set_tolerance → set_tolerance, check_and_fix_uv_trim_curves and rebuild_uv_trim_curves → p2; statuses ignored as SmBrep.cpp:9840/9854/2014.
  • heal.stitch_p1 (port: heal.stitch_p1 #196): brep_notify_pre_edit → brep_p2::notify(.., PreEdit, [this, None, None]) on an empty notify state (no B-rep cache, no attribute state on the heal path).
  • topology.brep_p10 (port: topology.brep_p10 #130): is_manifold_solid (m_bManifold = IsManifoldSolid()), point_from_solution, shell_vertices(b, None), and merge_curves_on_surface, which now calls brep_p2::merge_curves_on_surface as SmBrep.cpp:25074. Its classification world over the B-rep cache is uninhabited (CacheMergeWorld), and its constructor is the UNPORTED(query.brep) stub: query.brep (todo) is the real blocker, as for topology.shell's shell_ray_sector.
  • brep_p2::connect_intervals → CurveClassification::connect_intervals(index, pos, false) (SmBrep.cpp:22072, SER); dropped from merge_curves_on_surface's # Errors doc.

Unit tests changed in other units' code (the back-edges make new paths reachable):

  • topology/brep/p10.rs (port: topology.brep_p10 #130): healing_runs_and_manifold_is_unported is now healing_runs_and_manifold_is_computed; an UNSURE manifold flag is computed (0 for a sheet) instead of deferring.
  • topology/brep/p7.rs (port: topology.brep_p7 #155): glue_no_ops gluing two bare edges (no edge uses) now reaches InvalidInput("edge without primary edge use") past the notifications; read_errors_and_deferral reads an empty file successfully (sm_CheckAndFixUVTrimCurves has nothing to fix).

Also from the follow-up branch (your nits on 87c57c02): the runner's Notify env (type-distinct keys, a B-rep record, 68 fixtures for all 17 operations), the ReplaceSurface pTopFace Deviations line, and the Sector guard refusing only t0 == t1 (12 inverted-interval fixtures).

Coverage, stated plainly

with_values=1367 no_values=0: every pass compares at least one value; the 330 below compare only a status code or constant output, which the summary counts as a value.

  • Passes with numeric content: 1037 of 1367. The queries, IsSheet / IsOrientedSheet, GetMinEdgeBBoxSize, SetTolerance, LocalCurveSector, DeleteStaleCaches and the Make*Topology topology summaries.
  • Passes without numeric content: 330. Notify (230, including the 68 that cover all 17 operations with the B-rep as a data object: the constant 0, neither side has a B-rep cache), MateLaminaEdgeToSurface (91: the early SM_ERR, including 3 noedit cases with the mating plane at ±1e300 / 1e160), MergeCurvesOnSurface (3: a status), SwapUV (2: face-less B-reps), RebuildUVTrimCurves (4: no UV curves).
  • No compared values yet: RayFire (query.brep's B-rep box), ReplaceSurface (face_p3), and MateLaminaEdgeToSurface past its early returns (it defers at SmFace::Notify before its wired edgeuse_p3 sites).
  • Normalised geometry: analytic face and edge geometry other than SmPlane / SmLine is turned into plain B-splines before each op; none of this unit's own branches depend on the kinds.
  • B-rep cache: no Rust caller can build one until query.brep lands, so the spatial-tree add/remove paths of Notify are not compared.

All of this is also in plan/findings.md ("topology.brep_p2 (PR #149): coverage limits of the difftest").

Upstream issues

  • HANG-18 (new): MateLaminaEdgeToSurface with a negative extension factor never returns (N_SrfExtendByDist). The FFI rejects a negative factor; the Rust returns InvalidInput.
  • HANG-9 (main's entry, extended): a mating surface so far from the edge that the squared distance overflows makes dMaxDist infinite and CreateExtendedSurface never stops halving. A MateProbe shim op replays Mate's early returns and then computes upstream's dMaxDist; the FFI refuses only a Mate that would extend by a non-finite distance.
  • HANG-28 (new): the shared fixture's SmVertexuse::GetVertexFaceGap (under init_gaps) slows down and then stops returning on a degree ≥ 2 B-spline face with a corner far out. Measured with timeouts on x, y and z: non-rational corners are fast up to 1.34e154 (≈ √DBL_MAX), slow from 1e155, not returning around 1e156; for a rational net (homogeneous, vertex = stored / w) a small weight moves the vertex out and a large one the stored value. The FFI refuses a non-rational corner coordinate above 1e154 and a rational one above 1e151 on the stored or the Cartesian value (pod probes and two re-checks).

UNPORTED tags and deferral labels changed

  • Removed (wired): the 8 UNPORTED(topology.shell) and 3 UNPORTED(topology.edgeuse_p3) sites in topology/brep/p2.rs; topology.brep_p6's UNPORTED(topology.brep_p2) SmBrep::Notify; UNPORTED(topology.edgeuse_p2) in query/edge.rs (superseded by port: topology.edgeuse_p3 #117's wiring in the merge); UNPORTED(intersect.curve_class_p7) in brep/p2.rs; port: topology.brep_p1 #145's UNPORTED(topology.brep_p2) SmBrep::GetMinEdgeBBoxSize in proto.rs.
  • Retagged: topology.shell's ShellRayWorld::shell_ray_sector default UNPORTED(topology.brep_p2) → UNPORTED(query.brep) (overseer ruling). topology.brep_p6's split now stops at UNPORTED(query.brep) SmBrep::CalculateBoundingBox, upstream's next call.
  • No UNPORTED(topology.brep_p2) remains in the crate.
  • Deferral labels (runner, not tags): heal.heal_data_p1's 7 SmApiHealBrep box cases defer to primitive.api_primitives (the Rust side cannot build the box); mass.integrator's former brep_p2 deferral is port: topology.brep_p1 #145's harness:mass.integrator-face-construction.

AGENTS.md §4 step 5 checklist

  1. Default arguments match upstream: SetTolerance(TRUE, TRUE) and the cascades (FALSE), SmEdge::CalculateBoundingBox bTight = FALSE, curve boxes bExpandBox = TRUE, SetUVTrimCurve(NULL, 0.0, TRUE, NULL), CreateExtendedCurve bPrecise = TRUE, ReplaceSurface(pFace, pExt, FALSE, NULL) with bOptCreateUVTrimCurves = TRUE, AreCoincidentMaybe(.., FALSE), SmFace::SetSurface bDeleteCurrFace = FALSE, GetOrCreateUVTrimCurve(pUV) (NULL, NULL, TRUE), NormalizedEvaluate(t, FALSE, pnt) (NULL, TRUE), TransferChildrenTo(pTo, NULL).
  2. No dropped parameters: attribute filters are passed through; SmZoneTol3d values are converted with zone_tol3d (fabs).
  3. Special branches all ported: the plane mating-surface extension, the wire and shell-vertex shortcuts of LocalCurveSector, the vertex vote, [B111], [B674], the vertex-shell swap and removal of MakeEdgeTopology.
  4. Statuses honoured as upstream: ignored statuses stay ignored (region Remove, the first GetOrCreateUVTrimCurve calls, Trim, the p6 notifications); only Unported and representation failures propagate.
  5. Real geometry kinds: the shim builds real SmPlane faces and mating surfaces next to B-splines.
  6. FFI guards reject only what is undefined or hangs upstream: bad indices; LocalCurveSector with an empty or non-finite interval, a point class outside 100..=110 or an orientation outside 0..=2; a null region without an infinite region; a negative mate extension factor (HANG-18); a mate whose probed extension distance is not finite (HANG-9); a degree ≥ 2 face under init_gaps with a corner past the HANG-28 bounds; non-finite values.
  7. Generated coverage: degenerate inputs, boundaries, extrapolated sector intervals, unknown orientation, tiny and huge scales.
  8. No panics or recursion: nothing recurses; every index goes through .get().
  9. Stubs: UNPORTED stubs exist only for units that are neither green nor partial.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xbnf2bFY8cTu4zUgAv9s85

Status (updated 2026-10-20 19:18 UTC)

  • Phase: batch: land 5 reviewed-clean contributor PRs #283 merge round pushed at 167dd352, on top of the review round for bherbruck's review 5578349117 (reply, updated with this round: port: topology.brep_p2 #149 (comment)). Main is merged in through 39ceb995 (batch: land 5 reviewed-clean contributor PRs #283, no rebase). No UNPORTED(topology.brep_p2) remains in any crate.
  • Gates: fmt, clippy (both configurations), wasm, cargo test -p solidcore (1507) pass; all 232 units have 0 failures, and cargo test -p difftest --features cpp fails only main's two known tests. Known deviation: 3 offset.offset_geometry_creation cases that pass on main now defer (ANALYTIC_EXPORT; SmSurfOfExtrusion / SmSphere, which have no Rust SurfaceKind, issue Coordinate Kernel-aware Surface dispatch for analytic surface kinds #76). offset --perturb is SENSITIVE 552/552 and its --fuzz 2000 is FUZZ-FAIL on 1 timeout (fuzz00504, the curve.curve_p5 cache-rebuild cost, not this unit's defect). brep_p2 --fuzz 2000 is FUZZ-PASS with differs=2 (the plane point solve at ±9.2e18).
  • Dependencies: builds on port: topology.brep_p1 #145 (merged). port: topology.brep_p3 #204 builds on this head.
  • Next: maintainer re-review 5589603096 at 167dd352 confirmed all three earlier must-fixes (6,839 extra cases, 0 mismatches). The only must-fix is a merge of current main (modules.toml and two reports); once that is pushed and CI is green it is good to merge. That merge round is in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
bluecmd and others added 6 commits October 16, 2026 13:19
Queries, SetTolerance, RebuildUVTrimCurves, Notify and the spatial tree
helpers, Make*Topology, ReplaceSurface, LocalCurveSector, RayFire,
MergeCurvesOnSurface and MateLaminaEdgeToSurface. Calls into brep_p1,
shell, face_p1/p3, edgeuse_p3, query.brep/face_p1 and curve_class_p2/4/5/7
are UNPORTED stubs. Wires SmBrep::Notify into topology::edge (NotifyEnv
gains the caller-held B-rep cache slot).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
…ge report

SmBrep::Notify is wired: topology.edge now PARTIAL 1715 passed, 0 failed,
72 deferred (none on topology.brep_p2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
…y.brep_p2; wire its accessors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
PARTIAL topology.brep_p2 cases=1006 passed=523 failed=0 deferred=483
(perturb SENSITIVE 523/523). The shim normalises analytic geometry to
plain B-splines and registers the B-rep face/edge/vertex lists first so
the port's list order (arena order) matches upstream's. The vertexuse
FFI/runner helpers it reuses become pub(crate). Unit tests cover the two
file statics the shim cannot call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
PARTIAL topology.brep_p2 cases=1390 passed=738 failed=0 deferred=652;
perturb SENSITIVE 738/738.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
@bluecmd

bluecmd commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

First full difftest run: topology.brep_p2 is PARTIAL with 523 pass, 0 fail and 483 deferred (--perturb sensitive 523/523). Most deferrals wait on edgeuse_p2 rebuild/UV paths, face_p3 and topology.shell. Builds on #145. Still a draft.

🤖 Generated with Claude Code

bluecmd and others added 2 commits October 16, 2026 15:31
…topology.edge counts after the Notify wiring

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
@bluecmd bluecmd mentioned this pull request Oct 16, 2026
bluecmd and others added 9 commits October 16, 2026 17:37
Wire UNPORTED(topology.brep_p2) in heal.heal_data_p2 / topology.trimming_tools
(SetTolerance) and mass.integrator / query.api_queries (IsManifoldSolid).
SwapUV ignores non-Unported sm_SwapFaceUV errors (void upstream);
sm_GetPointFromSol counts parameters by kind for foreign objects. The
B-rep cache slot moves out of edge::NotifyEnv (other open PRs build it
with struct literals) into brep::p2::notify's arguments. No generated
case compares nothing; findings record coverage limits; clippy fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
…opology.brep_p2

# Conflicts:
#	plan/findings.md
#	plan/modules.toml
#	reports/difftest/topology.edge.json
…esh reports and notes

PARTIAL topology.brep_p2 cases=1378 passed=723 failed=0 deferred=655,
0 both-errored, perturb SENSITIVE 723/723.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
# Conflicts:
#	reports/difftest/query.api_queries.json
…opology.brep_p2

# Conflicts:
#	reports/difftest/heal.heal_data_p2.json
…ngency-labs#150); follow main's CurveOnClassifyObjects + ClassGeometry bound

PARTIAL topology.brep_p2 cases=1378 passed=723 failed=0 deferred=655,
0 both-errored, perturb SENSITIVE 723/723; sc-remote green 192 units, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQThHpN1ijFAC69dfmSevR
bluecmd and others added 5 commits October 16, 2026 22:28
…f wiring, Sector guard, Stale caches, MergeIntervals faces)

- FFI rejects a negative MateLaminaEdgeToSurface extension factor (C++ hangs in
  N_SrfExtendByDist / ST_curxcdr, plan/upstream-issues.md HANG-18); the Rust port
  returns InvalidInput there; runner test mate_rejects_a_negative_extension_factor.
- query::edge's stale UNPORTED(topology.edgeuse_p2) step-off stub is wired to
  topology::edgeuse::p2::evaluate_binormal_step_off_into (new: upstream's in-place
  out-params); the cases now defer on their real blocker, topology.edgeuse_p3.
- LocalCurveSector guard: any point class (the default SM_ERR arm), SM_OT_UNKNOWN,
  intervals past the curve's domain; RayFire: negative tolerance, zero direction.
- DeleteStaleCaches: both sides seed trimmed-surface caches by face masks and
  compare which survive.
- MergeCurvesOnSurface keeps the faces of a failed MergeIntervals
  (CurveClassification::merge_intervals_into).
- p2.rs header table complete; Deviations for the minor review notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xbnf2bFY8cTu4zUgAv9s85
…angency-labs#65); regenerate reports

Removes the UNPORTED(intersect.curve_class_p7) stub in MergeCurvesOnSurface.
difftest: topology.brep_p2 1626 cases, 917 pass, 0 fail, 709 deferred;
query.edge 1368/1190/0/178 (topology.edgeuse_p3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xbnf2bFY8cTu4zUgAv9s85
Brings in tangency-labs#161 (boolean.merge_p5) and tangency-labs#163 (boolean.merge_p1); topology.edge
notes keep the Notify wiring note and add tangency-labs#163's sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xbnf2bFY8cTu4zUgAv9s85
…-18); drop duplicate UB-136

- modules.toml: brep_p2 notes with 1626/917/0/709, deferrals by true blocker
  (topology.edgeuse_p3 309), 259 passes without numeric content, FFI guards,
  wiring of query::edge step-off and AreCoincidentMaybe; query.edge notes name
  topology.edgeuse_p3.
- findings.md: coverage numbers, DeleteStaleCaches seeding, face_p2
  GetTolerance stubs, FFI restrictions.
- upstream-issues.md: remove the SmCopyBrepMap UB-136 entry carried in from a
  stale tangency-labs#145 merge (it is UB-98, as tangency-labs#145's latest branch has it); the shim
  comment and brep_p1 note point at UB-98.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xbnf2bFY8cTu4zUgAv9s85
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…ncy-labs#252 fillet_geom_p4) into unit/topology.brep_p3

Conflicts: two reports (main's; regenerated by the gate) and plan/modules.toml
(main's notes with tangency-labs#149's and tangency-labs#204's UPDATEs appended).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EejtV1zKGq7z2inPd9ZrxY
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…mt the adapter test

Full gate on 4c7a444: brep_p3 897 / 664 / 0 / 233, --perturb 664/664, FUZZ-PASS 2000,
valgrind clean on 33 filters, 32 touched units 0 failed, 1552 tests; green 235 units,
0 failed. Report changes from this round: boolean.merge_p3 (37) and boolean.api_brep
(21) relabel SmBrep(copy) topology.brep_p3 -> topology.brep_p4 StitchFaces; the
query.api_queries / heal.heal_data_p1 changes are tangency-labs#149's and main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bherbruck
bherbruck merged commit b73c475 into tangency-labs:main Oct 20, 2026
4 checks passed
@tangency-monitor

Copy link
Copy Markdown

Landed in batch #315; thanks @bluecmd!

🤖 Generated with Claude Code

denelson1-dot added a commit to denelson1-dot/solidcore that referenced this pull request Oct 20, 2026
, tangency-labs#314) into unit/blend.fillet_solver_p3

Conflicts in offset.offset_geometry_creation: main's batch wired its
topology.brep_p2 stubs (tangency-labs#149), and this branch carries tangency-labs#192's wiring of
SmCircularCrossSectionFSG::CreateSurfaceFromCurves. The module's stub list now
names only the curve.crv_on_surf stub left; the unit's notes take main's text
(the tangency-labs#149 re-runs) and the report main's copy, both refreshed after --green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
denelson1-dot added a commit to denelson1-dot/solidcore that referenced this pull request Oct 20, 2026
…with tangency-labs#192's wiring

--green at 1ef8cb7 (x86_64): 235 units, 114 passed, 121 partial, 0 failed.
main's topology.brep_p2 wiring (tangency-labs#149) plus tangency-labs#192's
SmCircularCrossSectionFSG::CreateSurfaceFromCurves: 562 passed, 0 failed,
299 deferred (main's report: 552 / 309; its 11 blend.fillet_standard_solver_p1
deferrals: 10 pass, 1 reaches curve.crv_on_surf).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…angency-labs#149 wired topology.brep_p2)

830 cases, 713 pass, 0 fail, 117 deferred (query.brep 18, topology.face_p2 82,
topology.face_p4 17); the report equals main's case for case except the 7
face-box cases, which still defer deeper (6 at SmFace::GetUpwardLoopuses, 1 at
SmBrep::CalculateBoundingBox). Perturb 713/713, FUZZ-PASS 2000, merge_p4
unchanged 311/30/0/278.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pluto-XI added a commit to Pluto-XI/solidcore that referenced this pull request Oct 20, 2026
Main landed topology.brep_p2 (tangency-labs#149) as partial, so its stubs here become real
calls: the SmMerge constructor's GetMinEdgeBBoxSize (with_breps now takes the
kernel), MergeAddedTopology's SmBrep::Notify and IsManifoldSolid (required
MergeBrep methods; the runner deletes its B-rep cache on PRE_EDIT), and
api_brep's IsManifoldSolid. The runner passes brep_p6's new notification
environment to TestClosureSplitRegion.

make_faceuse_unmated_vertex now reaches MakeShellVertexTopology: the shim
numbers the new vertex use by its native walk (shells before face uses) while
the arena appends it, so the shared merge_p5 snapshot numbers records by the
same walk (merge_p1 runner's Canon::of_native).

Also drops the redundant too_many_* allows in merge/p2.rs (workspace allows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
… (brep_p2 wired)

With topology.brep_p2's stubs wired on main, part 7's glue no longer stops at
its first notify: a wire edge to delete now stops at SmBrep::DeleteEdge
(topology.brep_p4). The unit test builds real wire edges (shell-owned edge
uses) and pins that; header and modules.toml note updated. Both stitch reports
stay byte-identical to main's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…ctor_p2-close-intersection-loop

Brings in batch tangency-labs#315 (tangency-labs#149). The p2 and merge_p4 notes keep this branch's text,
with main's appended tangency-labs#149 re-run sentence added. The p2 report is regenerated on
the merge: 905 cases, 725 pass, 0 fail, 180 deferred. All 841 shared cases equal
main's report. Against the previous tangency-labs#281 report, only 6 deferrals are relabelled
by tangency-labs#149's brep_p2 wiring (4 Notify -> brep_p1 m_pVertexListHead, 2
GetMinEdgeBBoxSize -> face_p2 GetTolerance); the notes' breakdown is updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…ifold-boolean

Brings in batch tangency-labs#315 (tangency-labs#149). The merge_p3 and merge_p4 notes keep this
branch's text, with main's appended tangency-labs#149 re-run sentence added. Re-gated: merge_p3
387 cases, 215 pass, 0 fail, 172 deferred, identical case by case except
the 40 merge_p4 -> merge_p2 relabels this PR makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…angency-labs#149 wired topology.brep_p2)

The report equals main's tangency-labs#149 re-run case for case plus this branch's 13
cases: 874 cases, 565 pass, 0 fail, 309 deferred (the 166 topology.brep_p2
deferrals are gone); perturb 565/565; seeds 4074/2650/0/1424; 327 success
paths; the same two fuzz draws (fuzz01915 timeout, fuzz01241 differs note);
green-par 234 units, failed=0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
… brep p2 wiring) into unit/blend.fillet_executive_p2

The p2 runner's Access runs topology::brep::p2::set_tolerance for real (now required on
ExecutiveAccess).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bluecmd added a commit to bluecmd/solidcore that referenced this pull request Oct 20, 2026
…bs#315, tangency-labs#149 topology.brep_p2) into unit/topology.brep_p3

Conflicts:
- topology_intersector/p2.rs: main's header (GetFaces / CombineCoincidentVertices
  through IntersectorBrepP2) without the DeleteFace stub entry tangency-labs#204 wired; both old
  stubs (GetFaces, DeleteFace) dropped.
- intersector_p1 runner: both imports (bp3 and bp5).
- plan/modules.toml: main's notes (now including tangency-labs#149's) with tangency-labs#204's UPDATEs appended;
  tangency-labs#149's text is not repeated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bherbruck bherbruck mentioned this pull request Oct 21, 2026
tdamsma added a commit to tdamsma/solidcore that referenced this pull request Oct 21, 2026
Conflicts: fillet_custom_solver/fillet_intersector/fillet_solver p1 keep this
branch's wiring (main's side equalled the older merge base); topology/brep/p7
takes main's (tangency-labs#149); offset_geometry_creation header drops the brep_p2 stub
mention main wired; offset notes and report taken from main, regenerated below.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9QwJFBTKLZ9FFK3nVd1X4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants