solidcore

Units / topology

topology.brep_p1 green

Layer
45
Upstream lines
2,511
Functions
53
Rust module
topology::brep::p1

Status history

Oct 12Nov 25
  1. todo 2,454 lines
  2. partial 2,454 lines
  3. green 2,454 lines

Source: crates/solidcore/src/topology/brep/p1.rs

Upstream: source/SMLib/inc/SmBrep.h, source/SMLib/src/SmBrep.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

GREEN (2026-10-25, PR #896): BSplineSurface::create_corner_blend_with_context downcasts general SmCurve inputs in loop order, clearing the last 5 cos_*_3210 nurbs.b_spline_surface_n_lib_p2 deferrals; remaining read-only/opaque-handle adapter fallbacks marked DISPATCH GAP. PASS topology.brep_p1 cases=2627 passed=2611 failed=0 deferred=0 max_rel_err=0e0 with_values=2566 no_values=45 vacuous=0 rejected=16; --perturb SENSITIVE. UPDATE (heal_data_p3 editing/notify + bind_uv_trim_owners, 2026-10-25): Endcap_heal passes (known_mismatch 1 -> 0): PARTIAL topology.brep_p1 cases=2627 passed=2606 failed=0 deferred=5 max_rel_err=0e0 rejected=16 blocked_by=nurbs.b_spline_surface_n_lib_p2(5). SmSurface::DropCurve face cache (PR #875): CreateCornerBlend passes the live B-rep face services to the neighbour drops; deferred 15 -> 7 (the 8 _corner_blend_3 cases cleared; left: 5 cos_*_3210 on nurbs.b_spline_surface_n_lib_p2, surface.surface_p2 1, topology.face_p2 1). 2026-10-24 (wire: trimmed surface cache history; the intersect::curve_class::p7 tolerance-growth deferral removed, plan/findings.md 'trimmed surface cache history: tolerance-growth deferral removed'), Linux, stacked PR with main merged 2026-10-25: the surface.surface_p2 deferral (Endcap_heal) is a known mismatch. PARTIAL topology.brep_p1 cases=2627 passed=2596 failed=0 deferred=14 rejected=16 known_mismatch=1 blocked_by=nurbs.b_spline_surface_n_lib_p2(5),topology.face_p2(9). main CI e33985411 (2026-10-23): PARTIAL topology.brep_p1 cases=2627 passed=2461 failed=0 deferred=150 rejected=16 blocked_by=intersect.curve_class_p4(12),nurbs.b_spline_surface_n_lib_p2(8),surface.surface_p2(1),topology.edge(10),topology.face_p2(117),topology.face_p4(2). EXACT SmSurfOfRevolution EXPORT (PR #304, shared graph exports carry revolution faces exactly; refreshed on main ca3bbd2b, 2026-10-21): difftest 2627 cases, 2207 pass, 0 failed, 404 deferred, 16 rejected (harness:analytic-geometry-export 131, topology.face_p2 94, query.brep 71, geom.tol 64, topology.face_p3 21, intersect.surface_drop_lib_p3 10, curve.crv_on_surf 8, nurbs.b_spline_surface_n_lib_p2 5), max_rel_err 0; 2146 -> 2207 pass; the revolution harness deferrals became passes and deferrals on real stubs; harness label 228 -> 131 (extrusion, sphere, cone/cylinder). Earlier: PARTIAL (PR #145, follow-up after its review): difftest 2627 cases (2335 fixtures on the 15 upstream .smb files, 276 on constructed B-reps, 16 generated), 2142 pass bit-identical, of which 2097 compare values (5 of them, CreateCornerBlend on three edge uses, only the C++ failure status and an empty surface list) and 45 are guard agreements, not coverage (the C++ is not run: the shim stops before an upstream null dereference; 30 are the port's matching refusal: 27 UB-162 redistribute, 3 SWAP without an old infinite region; 15 AddAttributes on a null indexed target are a runner-side mirror with no port call), 16 rejected (15 ops naming an entity kind the wire B-reps lack, 1 HANG-39 corner blend: nothing runs on either side), 0 failed, 469 deferred, max_rel_err 0, --perturb SENSITIVE 2142/2142; --fuzz 2000 (see Round 7); a 1000-seed generated sweep (3611 cases) passes 2881, 0 failed, 714 deferred, 16 rejected (2805 compare values; the other 76 are the same guard agreements); green 206 units (main 89dc103a's units + this unit), 0 failed. All 50 fns have Rust bodies (sm_RedistributeSeamUVTrimCurves and BrepIntersect fully, stubs only at the callee sites); calls into topology.face_p3 (#139) and query.brep are UNPORTED stubs (topology.shell #154 is wired since Round 5, topology.edgeuse_p3 #117 since Round 6) (topology.face_p1's SwapUV is called since #148 merged: sm_SwapFaceUV calls topology.face_p1's SmFace::SwapUV (#148, wired after the merge; status ignored as upstream's release SE, Unported still propagates): on an unmarked face the shim now runs the C++ swap and both sides compare the swapped B-rep digest (the heal digest: surfaces, trim-curve fingerprints, loop-use links), but every such case defers at SmFace::GetBrep (topology.face_p4), the first call of face_p1's swap_uv, so none compares yet (the 16 former topology.face_p1 deferrals are now topology.face_p4 16; no deferral flipped to pass).); HealBrep runs the heal sequence of heal.heal_data_p3 (#164) and compares the healed B-rep (SmBrep::HealBrep always returns SM_SUCCESS): both sides emit the same digest of the healed topology after the heal (Export extras, every record's links, orientations, geometry ids/types, domains, tolerances, gap flags); the 5 Fix_BackPointers fixtures on the B-spline-only files (Endcap, disk, ellips_ts2, plane_circ, plane_square) compare it (2785 values), the other 10 defer on the analytic export, 3 generated heal cases compare in the 1000-seed sweep, no heal case passes on status alone; the digest exposed that the runner's import never set the Rust region list head (import fixed: the exported head is the infinite region); SmSurface::CreateBlendSurface (surface.surface_p8, partial) is called. Coverage caveats: SmLockBrepBox has no passing case (query.brep), and HealBrep passes only up to SM_HO_FIX_BACKPOINTERS: from SM_HO_CACHE_EDGEPROPS on, the sequence reaches SmEdgeuse::NormalizedEvaluate on every B-rep with edges (harness defect fixed in the final round: the HealBrep fixtures passed healer op 39, outside SmHealerOpType whose SM_HO_ALL is 26; the C++ ran every step for it while the Rust runner mapped the unknown code to SM_HO_NONE, so with #164's sequence in place the 15 cases compared an always-equal status; the fixtures now pass SM_HO_ALL, the FFI rejects codes above 26, the generator draws 0..=26 and the runner refuses an unknown code); CreateCornerBlend (<2 edge uses), sm_SwapFaceUV (marked face), sm_RedistributeSeamUVTrimCurves (no trim curve / non-seam), IsDegenerate (vertex check) and most sm_MakeVertexSplitUVTrimCurve passes are early returns; GetFaces/GetEdges/GetVertices compare the imported native list order (no case lists after a mutation or on a Rust-built B-rep); the shim decides the deferral itself (-3, C++ not run) for BrepIntersect with faces (CreateCornerBlend with 2+ edge uses and CreateEdgeEdgeBlend blends run the C++ since Round 6). Adds to topology::Brep the SmBrep-owned members (infinite region, region list head, editing flag, size estimates, deleted surfaces, explicit face/edge/vertex list order; a future record deletion must unlink from the lists). Upstream defects: UB-98 (SmCopyBrepMap::SetAt/GetAt null deref) met again and reproduced with gdb; UB-162 (sm_RedistributeSeamUVTrimCurves reads sNewEdgeuses[3] unchecked) found by source review, the shim refuses it. Back-edges: UNPORTED(topology.brep_p1) wired in topology.edge, topology.brep_cache, heal.heal_data_p2 (GetTolerance, Get/SetThisModelSizeEstimate), geom.tools, mass.integrator, query.api_queries, heal.heal_data_p1 (#109: GetVertices/GetEdges/GetFaces, the region walk from the infinite region, HealBrep) and boolean.merge_p1 (#163: GetEdges, GetShells); the SmTol::GetZoneTol3d(SmObject) stubs of curve_cache, ellipse_p1, topology_solver_p1, trim_srf_cache, surface_cache_p1/p2, solution_array and the geom::tol header are self-tagged (the tolerance arms are ported but those sites hold an opaque object handle; maintainer's call); geom.object -> query.brep, proto_topology_p1 -> topology.brep_p2 (GetMinEdgeBBoxSize), trim_srf_cache editing flag -> topology.face_p4. 50 fns; largest: SmBrep::HealBrep, SmBrep::CreateCornerBlend, SmBrep::CreateEdgeEdgeBlend, sm_MakeVertexSplitUVTrimCurve; cycle back-edges (call into later units; stub or co-port): query.brep(3), heal.heal_data_p1(2); unit-SCC #22 (220 units); hazards: ptr-hash; 319 upstream test entry points reach this unit; CO-PORTED in topology.edgeuse_p1 (PR #55): SmBrep::m_bValidateOnly, the region/face use/loop use/edge use/vertex use arenas -> topology::Brep (validate_only, regions(), faceuses(), ..., add_*_record, _mut); CO-PORTED in topology.edgeuse_p2 (PR #87): SmBrep::m_sThisZoneTol3d, GetTolerance -> topology::Brep::tolerance, set_tolerance; CO-PORTED in heal.heal_data_p3 (PR #164): SmBrep::IsLiveTopologyMember -> heal::heal_data::p3::live (private, arena identity checks); UPDATE after topology.brep_p1: that co-port now calls topology::brep::p1::is_live_topology_member. Round 3 (oursland's review, the #145 delta review): the code after every per-call-site stub is ported (GetShells' mark-and-dedup loop, SetRegionIsVoidFlagsForNestedSolids' traversal, ResetInfiniteRegion's ONLY/SWAP arms, IsDegenerate's IsPointSized); statuses upstream ignores (SetRegionIsVoidFlagsForNestedSolids in ResetInfiniteRegion, GetOrCreateUVTrimCurve in CreateCornerBlend, SwapUV in sm_SwapFaceUV) propagate only Unported and the null-dereference InvalidInput; the corner blend's non-B-spline neighbour surface is labelled nurbs.b_spline_surface_n_lib_p2 (its CreateCornerBlend port takes B-spline neighbours); the SplitUv orientation and SwapFaceUv mark codes decode exactly (6 orient-0 fixtures added). Round 4 (delta review of 0e224736): SmMarkType codes pass through unchanged (the fixtures' 1/2/4/8/16 now run as named); the no_entity cases are rejected; RemoveAt(0) of an empty shell list is a no-op as in release; GetMatedShells' status is ignored; the CalculateBoundingBox / GetOrCreateUVTrimCurve stubs carry the header defaults and the latter returns its curve apart from the status; SmShell::GetRegion reads the co-ported Shell::region.; CO-PORTED in topology.shell (PR #154): SmBrep::GetEdges without a filter as topology::shell::brep_get_edges (edge arena in m_pEdgeListHead order); mass::integrator still stubs UNPORTED(topology.brep_p1): SmBrep::GetEdges (properties.rs) and can call it until this unit's port replaces it; Round 5 (main merged through #154 topology.shell, 1d015b6c): the 5 UNPORTED(topology.shell) sites are wired (SmRegion::GetShells with the attribute filter, SetIsVoid / IsVoid on the raw SmBoolean flag so UNSURE (2) negates to FALSE as upstream, SetList as the rotation of the region's shell list, SmShell::GetMatedShells); the 151 topology.shell deferrals all compare: 21 passed at once, 130 SetInf cases first failed only because the runner never emitted the void flags of a successful ResetInfiniteRegion / SetRegionIsVoidFlagsForNestedSolids (it does now; the SmSetRegionVoidType decode is exact), so all 151 pass; #154's SmBrep::GetEdges co-port now calls this port. Round 6 (main merged through 89dc103a: #186 shared FFI reader, #175 offset_executive_p1, #117 topology.edgeuse_p3, #230): the 3 UNPORTED(topology.edgeuse_p3) sites call topology::edgeuse::p3 with upstream's arguments: NormalizedEvaluate (bOKToMakeUVTrimCurve default TRUE; sm_RedistributeSeamUVTrimCurves requests the unused first derivative as upstream), GetOrCreateUVTrimCurve (header defaults NULL, NULL, TRUE; the curve upstream returns beside the status is read back with SmEdgeuse::GetUVTrimCurve), EvaluateBinormal (bUse3DOnly TRUE at both sites; CreateEdgeEdgeBlend takes the B-rep mutably and ignores both statuses as upstream, going on with the outputs upstream sees after a failure: undefined before EvaluateBinormal's 'Init outputs' step, else zero point/tangent/normal with an undefined binormal (review S1; the earlier round propagated the failure); no compared case reaches it yet); offset_executive_p1's UNPORTED(topology.brep_p1) SmBrep::GetEdges calls topology::brep::p1::edges (list order); its CreateEdgeEdgeBlend stub stays labelled topology.brep_p1: upstream pairs an original and an offset B-rep edge use, this port takes both in one B-rep. Harness: the shim ran no C++ for CreateCornerBlend with 2+ edge uses or CreateEdgeEdgeBlend blends (it wrote -3, 'the Rust side defers'); it now runs both. Its guards: the corner blend replays upstream's ordering and UV phase on a copy of the B-rep (surface types kept) and reports the null-dereference guard only where upstream would copy a NULL UV trim curve (no fixture or sweep case reaches it); the edge-edge blend replays CreateEdgeEdgeBlend up to CreateBlendSurface on its own rails and applies surface.surface_p8's UB-157 probe (SM_ERR for a failing sample, 1007 for a rail 2 that knot synchronisation moves), because running the blend corrupted the heap (UB-157, reached here too). The corner blend now emits the blend surfaces after the count. Flips against the previous report: 240 new UNSURE cases pass (the nested-solids !IsVoid() of UNSURE is unreachable upstream: the infinite region and every queued region are set to 0/1 before being read); 11 deferrals pass (5 CreateCornerBlend on three edge uses, which compare the C++ failure status and an empty surface list, and 6 sm_RedistributeSeamUVTrimCurves, which compare the status and the swap flag); 82 deferrals moved to later units (69 topology.face_p2, 10 intersect.surface_drop_lib_p3, 3 topology.face_p3); no pass changed. All 45 blend-flag CreateEdgeEdgeBlend fixtures still defer on the Rust side, so the blend path itself has no compared case. valgrind (--error-exitcode=99 --suppressions=harness/valgrind/ub11.supp) on corner, redistribute, _unsure, _inf, edge_edge_blend: 0 errors; the suppression covers only UB-11 (Memcheck:Cond in N_BasisInsertKnots, reached by the edge-edge blends; its entry records why that read cannot change a result); without it edge_edge_blend reports exactly that one error. Both shim probes' refusals are shim-decided statuses: guard agreements once the Rust side stops deferring. Round 7 (bherbruck's review of 5b1b28ae, follow-up PR after #145 merged with #196): CreateCornerBlend keeps any SmCurve through the point-curve padding; at the SmBSplineSurface::CreateCornerBlend call the first non-B-spline curve gives SM_ERR_NULL_POINTER (1006, sm_CreateNonRationalCurve's NER) after upstream's NULL UV / surface check, and defers to nurbs.b_spline_surface_n_lib_p2 when a rational curve precedes it (was the -2 guard); 30 crv_on_surf_face corner-blend fixtures (25 pass, 5 defer at n_lib_p2). CreateEdgeEdgeBlend takes each edge use's B-rep (b_2 None when shared); offset_executive_p1's UNPORTED(topology.brep_p1) in BuildSideWallOfEdgeuse is wired (it takes the original B-rep and defers at CreateFaceFromSurface, topology.brep_p8); a new edge_edge_blend2 op compares the ruled blend across two B-reps with distinguishable rails and unequal intervals in separate arenas (5 cases). Shared SmCrvOnSurf import uses owner flag 1 as the C++ graph (0 case changes over all 208 green/partial units). GetZoneTol3d(const SmObject) stubs tagged geom.tol (maintainer's answer): moves 26 curve_p1, 48 topology_solver_p1 and 6 topology_solver_p2 deferral labels. ParallelProj with a non-positive angle tolerance or an approximation tolerance below the smallest normal double (HANG-32) is rejected on both sides. Fuzz on the corner-blend path found UB-195 [PSIRT] (sm_CreateNonRationalCurve reads sUVCurves[0] after an empty rational-curve drop; located with gdb on a -g build; the shim's corner-blend replay now runs to that drop and both sides report the guard), HANG-39 (tangency tolerance below ~1e-24: tens of seconds in the Coons knot merge; the shim rejects a tolerance below 1e-20 only where its replay reaches the cross-tangent approximation, earlier statuses stay compared: one edge use SM_ERR, four non-tangent edge uses 1006) and HANG-29 (#147) while building a face block with a 1e300 control point (every block value bounded at 1e150; the reserved HANG-33 was retired as a duplicate). Open question recorded in findings for curve.line / topology.edge / topology.face_p2: a Line whose parameterisation was edited carries no NURB and the slicing copies hand on that base. Known back-edges left (UNPORTED(topology.brep_p1) elsewhere): offset_executive_p1.rs:827 GetInfiniteRegion ahead of #175's unported MakeFaceWithCurves tail (own follow-up, COORD.md); intersect/curve_class/p2.rs:267 IsLiveTopologyMember on a generic point-class handle (needs a ClassObject -> EntityRef accessor in intersect.point_class); topology/brep/p7.rs GetInfiniteRegion / SetInfiniteRegion (wired by the brep_p7 owner in #246, with the region-list head removal and the p7 runner's native infinite region). UPDATE after blend.fillet_geom_p1 (PR #147, merged with main 05731370): the surface caches now hold an exact copy of their surface that keeps its owner (clone_for_evaluation, as upstream's m_cpSurface pointer), so a face-owned surface's cache reaches SmTol::GetZoneTol3d(const SmObject*) of the face (UNPORTED(surface.surface_cache_p2)) where the old Clone dropped the owner and used the system tolerance: 2589 cases, 2109 pass, 0 failed, 465 deferred (surface.surface_cache_p2 37: 24 formerly topology.face_p2, 9 query.face_p2, 3 surface.surface_cache_p1, and Endcap_parallel_proj_1, which had passed on the system tolerance; topology.face_p2 now 89; the other deferrals unchanged), 15 rejected. After merging main with batch #269 (incl. #147's surface-cache owner change): 2627 cases, 2141 pass, 0 failed, 470 deferred, 16 rejected; the surface-cache GetZoneTol3d deferrals carry this branch's geom.tol label (37 here, Endcap_parallel_proj_1 among them; topology.brep_p10 5, topology.face_p3 46, offset.offset_geometry_creation 78 relabelled, reports regenerated); fuzz 2000 pass, perturb 2141/2141, valgrind 0. Main since: PARTIAL (PR #145, follow-up after its review): difftest 2627 cases (2335 fixtures on the 15 upstream .smb files, 276 on constructed B-reps, 16 generated), 2142 pass bit-identical, of which 2097 compare values (5 of them, CreateCornerBlend on three edge uses, only the C++ failure status and an empty surface list) and 45 are guard agreements, not coverage (the C++ is not run: the shim stops before an upstream null dereference; 30 are the port's matching refusal: 27 UB-162 redistribute, 3 SWAP without an old infinite region; 15 AddAttributes on a null indexed target are a runner-side mirror with no port call), 16 rejected (15 ops naming an entity kind the wire B-reps lack, 1 HANG-39 corner blend: nothing runs on either side), 0 failed, 469 deferred, max_rel_err 0, --perturb SENSITIVE 2142/2142; --fuzz 2000 (see Round 7); a 1000-seed generated sweep (3611 cases) passes 2881, 0 failed, 714 deferred, 16 rejected (2805 compare values; the other 76 are the same guard agreements); green 206 units (main 89dc103a's units + this unit), 0 failed. All 50 fns have Rust bodies (sm_RedistributeSeamUVTrimCurves and BrepIntersect fully, stubs only at the callee sites); calls into topology.face_p3 (#139) and query.brep are UNPORTED stubs (topology.shell #154 is wired since Round 5, topology.edgeuse_p3 #117 since Round 6) (topology.face_p1's SwapUV is called since #148 merged: sm_SwapFaceUV calls topology.face_p1's SmFace::SwapUV (#148, wired after the merge; status ignored as upstream's release SE, Unported still propagates): on an unmarked face the shim now runs the C++ swap and both sides compare the swapped B-rep digest (the heal digest: surfaces, trim-curve fingerprints, loop-use links), but every such case defers at SmFace::GetBrep (topology.face_p4), the first call of face_p1's swap_uv, so none compares yet (the 16 former topology.face_p1 deferrals are now topology.face_p4 16; no deferral flipped to pass).); HealBrep runs the heal sequence of heal.heal_data_p3 (#164) and compares the healed B-rep (SmBrep::HealBrep always returns SM_SUCCESS): both sides emit the same digest of the healed topology after the heal (Export extras, every record's links, orientations, geometry ids/types, domains, tolerances, gap flags); the 5 Fix_BackPointers fixtures on the B-spline-only files (Endcap, disk, ellips_ts2, plane_circ, plane_square) compare it (2785 values), the other 10 defer on the analytic export, 3 generated heal cases compare in the 1000-seed sweep, no heal case passes on status alone; the digest exposed that the runner's import never set the Rust region list head (import fixed: the exported head is the infinite region); SmSurface::CreateBlendSurface (surface.surface_p8, partial) is called. Coverage caveats: SmLockBrepBox has no passing case (query.brep), and HealBrep passes only up to SM_HO_FIX_BACKPOINTERS: from SM_HO_CACHE_EDGEPROPS on, the sequence reaches SmEdgeuse::NormalizedEvaluate on every B-rep with edges (harness defect fixed in the final round: the HealBrep fixtures passed healer op 39, outside SmHealerOpType whose SM_HO_ALL is 26; the C++ ran every step for it while the Rust runner mapped the unknown code to SM_HO_NONE, so with #164's sequence in place the 15 cases compared an always-equal status; the fixtures now pass SM_HO_ALL, the FFI rejects codes above 26, the generator draws 0..=26 and the runner refuses an unknown code); CreateCornerBlend (<2 edge uses), sm_SwapFaceUV (marked face), sm_RedistributeSeamUVTrimCurves (no trim curve / non-seam), IsDegenerate (vertex check) and most sm_MakeVertexSplitUVTrimCurve passes are early returns; GetFaces/GetEdges/GetVertices compare the imported native list order (no case lists after a mutation or on a Rust-built B-rep); the shim decides the deferral itself (-3, C++ not run) for BrepIntersect with faces (CreateCornerBlend with 2+ edge uses and CreateEdgeEdgeBlend blends run the C++ since Round 6). Adds to topology::Brep the SmBrep-owned members (infinite region, region list head, editing flag, size estimates, deleted surfaces, explicit face/edge/vertex list order; a future record deletion must unlink from the lists). Upstream defects: UB-98 (SmCopyBrepMap::SetAt/GetAt null deref) met again and reproduced with gdb; UB-162 (sm_RedistributeSeamUVTrimCurves reads sNewEdgeuses[3] unchecked) found by source review, the shim refuses it. Back-edges: UNPORTED(topology.brep_p1) wired in topology.edge, topology.brep_cache, heal.heal_data_p2 (GetTolerance, Get/SetThisModelSizeEstimate), geom.tools, mass.integrator, query.api_queries, heal.heal_data_p1 (#109: GetVertices/GetEdges/GetFaces, the region walk from the infinite region, HealBrep) and boolean.merge_p1 (#163: GetEdges, GetShells); the SmTol::GetZoneTol3d(SmObject*) stubs of curve_cache, ellipse_p1, topology_solver_p1, trim_srf_cache, surface_cache_p1/p2, solution_array and the geom::tol header are self-tagged (the tolerance arms are ported but those sites hold an opaque object handle; maintainer's call); geom.object -> query.brep, proto_topology_p1 -> topology.brep_p2 (GetMinEdgeBBoxSize), trim_srf_cache editing flag -> topology.face_p4. 50 fns; largest: SmBrep::HealBrep, SmBrep::CreateCornerBlend, SmBrep::CreateEdgeEdgeBlend, sm_MakeVertexSplitUVTrimCurve; cycle back-edges (call into later units; stub or co-port): query.brep(3), heal.heal_data_p1(2); unit-SCC #22 (220 units); hazards: ptr-hash; 319 upstream test entry points reach this unit; CO-PORTED in topology.edgeuse_p1 (PR #55): SmBrep::m_bValidateOnly, the region/face use/loop use/edge use/vertex use arenas -> topology::Brep (validate_only, regions(), faceuses(), ..., add_*_record, _mut); CO-PORTED in topology.edgeuse_p2 (PR #87): SmBrep::m_sThisZoneTol3d, GetTolerance -> topology::Brep::tolerance, set_tolerance; CO-PORTED in heal.heal_data_p3 (PR #164): SmBrep::IsLiveTopologyMember -> heal::heal_data::p3::live (private, arena identity checks); UPDATE after topology.brep_p1: that co-port now calls topology::brep::p1::is_live_topology_member. Round 3 (oursland's review, the #145 delta review): the code after every per-call-site stub is ported (GetShells' mark-and-dedup loop, SetRegionIsVoidFlagsForNestedSolids' traversal, ResetInfiniteRegion's ONLY/SWAP arms, IsDegenerate's IsPointSized); statuses upstream ignores (SetRegionIsVoidFlagsForNestedSolids in ResetInfiniteRegion, GetOrCreateUVTrimCurve in CreateCornerBlend, SwapUV in sm_SwapFaceUV) propagate only Unported and the null-dereference InvalidInput; the corner blend's non-B-spline neighbour surface is labelled nurbs.b_spline_surface_n_lib_p2 (its CreateCornerBlend port takes B-spline neighbours); the SplitUv orientation and SwapFaceUv mark codes decode exactly (6 orient-0 fixtures added). Round 4 (delta review of 0e224736): SmMarkType codes pass through unchanged (the fixtures' 1/2/4/8/16 now run as named); the no_entity cases are rejected; RemoveAt(0) of an empty shell list is a no-op as in release; GetMatedShells' status is ignored; the CalculateBoundingBox / GetOrCreateUVTrimCurve stubs carry the header defaults and the latter returns its curve apart from the status; SmShell::GetRegion reads the co-ported Shell::region.; CO-PORTED in topology.shell (PR #154): SmBrep::GetEdges without a filter as topology::shell::brep_get_edges (edge arena in m_pEdgeListHead order); mass::integrator still stubs UNPORTED(topology.brep_p1): SmBrep::GetEdges (properties.rs) and can call it until this unit's port replaces it; Round 5 (main merged through #154 topology.shell, 1d015b6c): the 5 UNPORTED(topology.shell) sites are wired (SmRegion::GetShells with the attribute filter, SetIsVoid / IsVoid on the raw SmBoolean flag so UNSURE (2) negates to FALSE as upstream, SetList as the rotation of the region's shell list, SmShell::GetMatedShells); the 151 topology.shell deferrals all compare: 21 passed at once, 130 SetInf cases first failed only because the runner never emitted the void flags of a successful ResetInfiniteRegion / SetRegionIsVoidFlagsForNestedSolids (it does now; the SmSetRegionVoidType decode is exact), so all 151 pass; #154's SmBrep::GetEdges co-port now calls this port. Round 6 (main merged through 89dc103a: #186 shared FFI reader, #175 offset_executive_p1, #117 topology.edgeuse_p3, #230): the 3 UNPORTED(topology.edgeuse_p3) sites call topology::edgeuse::p3 with upstream's arguments: NormalizedEvaluate (bOKToMakeUVTrimCurve default TRUE; sm_RedistributeSeamUVTrimCurves requests the unused first derivative as upstream), GetOrCreateUVTrimCurve (header defaults NULL, NULL, TRUE; the curve upstream returns beside the status is read back with SmEdgeuse::GetUVTrimCurve), EvaluateBinormal (bUse3DOnly TRUE at both sites; CreateEdgeEdgeBlend takes the B-rep mutably and ignores both statuses as upstream, going on with the outputs upstream sees after a failure: undefined before EvaluateBinormal's 'Init outputs' step, else zero point/tangent/normal with an undefined binormal (review S1; the earlier round propagated the failure); no compared case reaches it yet); offset_executive_p1's UNPORTED(topology.brep_p1) SmBrep::GetEdges calls topology::brep::p1::edges (list order); its CreateEdgeEdgeBlend stub stays labelled topology.brep_p1: upstream pairs an original and an offset B-rep edge use, this port takes both in one B-rep. Harness: the shim ran no C++ for CreateCornerBlend with 2+ edge uses or CreateEdgeEdgeBlend blends (it wrote -3, 'the Rust side defers'); it now runs both. Its guards: the corner blend replays upstream's ordering and UV phase on a copy of the B-rep (surface types kept) and reports the null-dereference guard only where upstream would copy a NULL UV trim curve (no fixture or sweep case reaches it); the edge-edge blend replays CreateEdgeEdgeBlend up to CreateBlendSurface on its own rails and applies surface.surface_p8's UB-157 probe (SM_ERR for a failing sample, 1007 for a rail 2 that knot synchronisation moves), because running the blend corrupted the heap (UB-157, reached here too). The corner blend now emits the blend surfaces after the count. Flips against the previous report: 240 new UNSURE cases pass (the nested-solids !IsVoid() of UNSURE is unreachable upstream: the infinite region and every queued region are set to 0/1 before being read); 11 deferrals pass (5 CreateCornerBlend on three edge uses, which compare the C++ failure status and an empty surface list, and 6 sm_RedistributeSeamUVTrimCurves, which compare the status and the swap flag); 82 deferrals moved to later units (69 topology.face_p2, 10 intersect.surface_drop_lib_p3, 3 topology.face_p3); no pass changed. All 45 blend-flag CreateEdgeEdgeBlend fixtures still defer on the Rust side, so the blend path itself has no compared case. valgrind (--error-exitcode=99 --suppressions=harness/valgrind/ub11.supp) on corner, redistribute, _unsure, _inf, edge_edge_blend: 0 errors; the suppression covers only UB-11 (Memcheck:Cond in N_BasisInsertKnots, reached by the edge-edge blends; its entry records why that read cannot change a result); without it edge_edge_blend reports exactly that one error. Both shim probes' refusals are shim-decided statuses: guard agreements once the Rust side stops deferring. Round 7 (bherbruck's review of 5b1b28ae, follow-up PR after #145 merged with #196): CreateCornerBlend keeps any SmCurve through the point-curve padding; at the SmBSplineSurface::CreateCornerBlend call the first non-B-spline curve gives SM_ERR_NULL_POINTER (1006, sm_CreateNonRationalCurve's NER) after upstream's NULL UV / surface check, and defers to nurbs.b_spline_surface_n_lib_p2 when a rational curve precedes it (was the -2 guard); 30 crv_on_surf_face corner-blend fixtures (25 pass, 5 defer at n_lib_p2). CreateEdgeEdgeBlend takes each edge use's B-rep (b_2 None when shared); offset_executive_p1's UNPORTED(topology.brep_p1) in BuildSideWallOfEdgeuse is wired (it takes the original B-rep and defers at CreateFaceFromSurface, topology.brep_p8); a new edge_edge_blend2 op compares the ruled blend across two B-reps with distinguishable rails and unequal intervals in separate arenas (5 cases). Shared SmCrvOnSurf import uses owner flag 1 as the C++ graph (0 case changes over all 208 green/partial units). GetZoneTol3d(const SmObject) stubs tagged geom.tol (maintainer's answer): moves 26 curve_p1, 48 topology_solver_p1 and 6 topology_solver_p2 deferral labels. ParallelProj with a non-positive angle tolerance or an approximation tolerance below the smallest normal double (HANG-32) is rejected on both sides. Fuzz on the corner-blend path found UB-195 [PSIRT] (sm_CreateNonRationalCurve reads sUVCurves[0] after an empty rational-curve drop; located with gdb on a -g build; the shim's corner-blend replay now runs to that drop and both sides report the guard), HANG-39 (tangency tolerance below ~1e-24: tens of seconds in the Coons knot merge; the shim rejects a tolerance below 1e-20 only where its replay reaches the cross-tangent approximation, earlier statuses stay compared: one edge use SM_ERR, four non-tangent edge uses 1006) and HANG-29 (#147) while building a face block with a 1e300 control point (every block value bounded at 1e150; the reserved HANG-33 was retired as a duplicate). Open question recorded in findings for curve.line / topology.edge / topology.face_p2: a Line whose parameterisation was edited carries no NURB and the slicing copies hand on that base. Known back-edges left (UNPORTED(topology.brep_p1) elsewhere): offset_executive_p1.rs:827 GetInfiniteRegion ahead of #175's unported MakeFaceWithCurves tail (own follow-up, COORD.md); intersect/curve_class/p2.rs:267 IsLiveTopologyMember on a generic point-class handle (needs a ClassObject -> EntityRef accessor in intersect.point_class); topology/brep/p7.rs GetInfiniteRegion / SetInfiniteRegion (wired by the brep_p7 owner in #246, with the region-list head removal and the p7 runner's native infinite region). UPDATE after blend.fillet_geom_p1 (PR #147, merged with main 05731370): the surface caches now hold an exact copy of their surface that keeps its owner (clone_for_evaluation, as upstream's m_cpSurface pointer), so a face-owned surface's cache reaches SmTol::GetZoneTol3d(const SmObject*) of the face (UNPORTED(surface.surface_cache_p2)) where the old Clone dropped the owner and used the system tolerance: 2589 cases, 2109 pass, 0 failed, 465 deferred (surface.surface_cache_p2 37: 24 formerly topology.face_p2, 9 query.face_p2, 3 surface.surface_cache_p1, and Endcap_parallel_proj_1, which had passed on the system tolerance; topology.face_p2 now 89; the other deferrals unchanged), 15 rejected. After merging main with batch #269 (incl. #147's surface-cache owner change): 2627 cases, 2141 pass, 0 failed, 470 deferred, 16 rejected; the surface-cache GetZoneTol3d deferrals carry this branch's geom.tol label (37 here, Endcap_parallel_proj_1 among them; topology.brep_p10 5, topology.face_p3 46, offset.offset_geometry_creation 78 relabelled, reports regenerated); fuzz 2000 pass, perturb 2141/2141, valgrind 0. CO-PORTED in topology.brep_p3 (PR #204): Brep::notify_serial and its crate-private identity slot (the B-rep's kernel-issued notification serial; upstream objects are known by address) -> topology::Brep Owner zone-tol cache (surface/owner-zone-tol): 2627 cases, 2193 pass, 0 fail, 418 deferred. edge_edge_blend on analytic faces deferred as harness:analytic-geometry-export (+27). CO-PORTED in sweep.topology_sweep: curve_owners/surface_owners accept caller owner identities for transforms; curves/surfaces retain the arena-owner convention. UPDATE (owning-face caches for CreateParallelProjectionCurves and sm_FindSectorOfFace): both take the B-rep mutably. The projection's surface cache and intersection come through the B-rep's live surface context, and FindSectorOfFace fetches the face's cache and checks it out with point testing off around its global drop, as upstream. PARTIAL topology.brep_p1 cases=2627 passed=2532 failed=0 deferred=79 blocked_by=intersect.curve_class_p4(12),nurbs.b_spline_surface_n_lib_p2(8),query.face_p2(30),surface.surface_p2(1),topology.edge(10),topology.face_p2(13),topology.face_p4(5) (was 2461 passed, 150 deferred; 71 of the 116 topology.face_p2 cases pass, 30 move on to SmFace::PointClassify, 3 to FindVertexSector). SM_API batch S2 (fixer-7, 2026-10-29): SmBrep::TessellateBoundaries added (tessellate_boundaries, BoundaryTessellation); compared through boolean.api_brep's tessellate_boundaries cases.

Goldens

This is committed inventory, not a runtime result or a correctness proof. A golden records what solidcore produced when blessed. Current results require the canonical CI gate, not these counts.

Golden records
2,636
Stored error outcomes
18
Stored deferrals
0
Stored harness rejections
0
Known-failure entries
0

Metadata counts describe fields in the stored records; they are not passes or live failures.

Source at f9704ee3b: golden JSONL · known-failure list.

Dependencies

Depends on: curve.curve_p2 green geom.a_object green geom.context green geom.extent1d green geom.extent2d green geom.object green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green surface.surface_p2 partial topology.edge green topology.edgeuse_p1 green topology.edgeuse_p3 green topology.face_p2 partial topology.loopuse green topology.proto_topology_p1 green topology.shell green topology.topology green topology.vertex green topology.vertexuse green

Soft dependencies: curve.crv_on_surf green curve.curve_p1 green curve.curve_p3 partial curve.curve_p5 partial curve.curve_p6 green geom.extent3d green nurbs.b_spline_curve_n_lib green nurbs.b_spline_curve_p2 green nurbs.b_spline_surface_n_lib_p1 green nurbs.b_spline_surface_n_lib_p2 green surface.surface_p1 green surface.surface_p4 green surface.surface_p5 green surface.surface_p7 green surface.surface_p8 green topology.face_p1 green topology.face_p3 green

Dependents: blend.feature_executive blocked blend.fillet_executive_p1 green blend.fillet_executive_p2 green blend.fillet_executive_p3 partial blend.fillet_geom_p1 green blend.hcr green boolean.merge_p1 green boolean.merge_p2 green boolean.merge_p3 green boolean.merge_p4 green heal.heal_data_p1 green heal.stitch_p1 green heal.stitch_p2 green intersect.api_intersectors partial mass.integrator partial offset.offset_executive_p1 partial offset.offset_executive_p2 partial primitive.primitive_creation_p1 green primitive.primitive_creation_p2 green primitive.primitive_creation_p3 green query.api_queries green query.brep green sweep.topology_sweep green topology.api_projection partial topology.brep_cache green topology.brep_constructor green topology.brep_cutting partial topology.brep_local_operation partial topology.brep_mirror green topology.brep_p2 green topology.brep_p3 partial topology.brep_p4 green topology.brep_p5 green topology.brep_p9 green topology.brep_planar_section partial topology.brep_validation green

Soft dependents: blend.fillet_geom_p4 partial blend.fillet_solver_p1 green boolean.merge_p5 green boolean.topology_intersector_p1 green boolean.topology_intersector_p2 green heal.heal_data_p3 green offset.offset_geometry_creation partial primitive.api_primitives green sweep.api_brep partial sweep.api_surfaces green sweep.rotational_sweep_geometry green sweep.trans_sweep_geometry green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmBrep::GetToleranceSmBrep.h:6991[Brep::tolerance] (in topology.rs)
SmBrep::GetThisModelSizeEstimateSmBrep.h:7135[Brep::this_model_size_estimate]
SmBrep::SetThisModelSizeEstimateSmBrep.h:7236[Brep::set_this_model_size_estimate]
SmBrep::SetThisLargeSmallSizeRatioSmBrep.h:7294[Brep::set_this_large_small_size_ratio]
SmBrep::GetInfiniteRegionSmBrep.h:7361[Brep::infinite_region] (in topology.rs), [Brep::set_infinite_region]
SmBrep::GetNumFacesSmBrep.h:7681[num_faces]
SmBrep::GetTopologyIndexSmBrep.h:7716
SmBrep::IsLiveTopologyMemberSmBrep.h:7846[is_live_topology_member]
SmBrep::SetInfiniteRegionSmBrep.h:13811[Brep::infinite_region] (in topology.rs), [Brep::set_infinite_region]
SmBrep::GetClassStringSmBrep.h:16111[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmBrep::GetTypeSmBrep.h:16111[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmBrep::GetTypeStringSmBrep.h:16111[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLockBrepBox::SmLockBrepBoxSmBrep.h:16393[LockBrepBox]
SmLockBrepBox::~SmLockBrepBoxSmBrep.h:16423
sm_CheckUVTrimCurveSmBrep.cpp:11684[check_uv_trim_curve]
sm_SwapFaceUVSmBrep.cpp:24054[swap_face_uv]
SmBrep::AddDeletedSurfaceSmBrep.cpp:87011[Brep::add_deleted_surface], [Brep::deleted_surfaces]
SmBrep::BrepIntersectSmBrep.cpp:89089[brep_intersect_mut], [brep_intersect_self]
SmBrep::CreateCornerBlendSmBrep.cpp:2488290[create_corner_blend]
SmBrep::CreateEdgeEdgeBlendSmBrep.cpp:2791274[create_edge_edge_blend]
sm_MarkLoopsToDeleteSmBrep.cpp:336651[mark_loops_to_delete]
SmBrep::CreateParallelProjectionCurvesSmBrep.cpp:492885[create_parallel_projection_curves], [ParallelProjectionOptions], [ParallelProjectionCurves]
SmBrep::ResetInfiniteRegionSmBrep.cpp:861449[reset_infinite_region], [SetRegionVoidType]
SmBrep::SetRegionIsVoidFlagsForNestedSolidsSmBrep.cpp:921258[set_region_is_void_flags_for_nested_solids]
SmBrep::GetTopologicalEdgesSmBrep.cpp:945224[wire_edges], [topological_edges], [topological_vertices]
SmBrep::GetWireEdgesSmBrep.cpp:948224[wire_edges], [topological_edges], [topological_vertices]
SmBrep::GetTopologicalVerticesSmBrep.cpp:955520[wire_edges], [topological_edges], [topological_vertices]
sm_RmAndDel_OldLoopVerticesSmBrep.cpp:1061151[rm_and_del_old_loop_vertices]
SmBrep::GetShellsSmBrep.cpp:1090138[shells]
SmBrep::GetSurfacesSmBrep.cpp:1094552[surfaces], [curves]
SmBrep::GetCurvesSmBrep.cpp:1100336[surfaces], [curves]
sm_FindSectorOfFaceSmBrep.cpp:11050131[find_sector_of_face]
sm_VoteForRegionSmBrep.cpp:1118715[vote_for_region], [find_highest_vote]
sm_FindHighestVoteSmBrep.cpp:1120816[vote_for_region], [find_highest_vote]
SmBrep::IsDegenerateSmBrep.cpp:1156426[is_degenerate]
sm_RedistributeSeamUVTrimCurvesSmBrep.cpp:12100153[redistribute_seam_uv_trim_curves]
sm_GetNaturalSeamIntervalSmBrep.cpp:1225749natural_seam_interval (crate)
sm_SeamIntervalLessSmBrep.cpp:123072is_first_nonseparating_seam (crate)
sm_AddAttributesSmBrep.cpp:1948223[add_attributes]
SmPendingTopologyDelete::ClearSmBrep.cpp:195391[PendingTopologyDelete]
SmBrep::HealBrepSmBrep.cpp:20973321[heal_brep]
sm_MakeVertexSplitUVTrimCurveSmBrep.cpp:21308156[make_vertex_split_uv_trim_curve]
sm_SetObjectMapSmBrep.cpp:2307514[ObjectMap], [set_object_map], [get_object_map]
sm_GetObjectMapSmBrep.cpp:230959[ObjectMap], [set_object_map], [get_object_map]
sm_ReverseReflectionEdgeusesSmBrep.cpp:2368912[reverse_reflection_edgeuses]
sm_SwapReflectionShellsSmBrep.cpp:2370214[swap_reflection_shells]
sm_FindSideOfCurveSmBrep.cpp:2512367[find_side_of_curve]
SmBrep::UpdateVertexEdgeIntervalsSmBrep.cpp:33254136[update_vertex_edge_intervals]
SmBrep::IsKindOfSmBrep.cpp:358394[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmBrep::GetEdgesSmBrep.cpp:383388[regions], [faces], [edges], [vertices]
SmBrep::GetFacesSmBrep.cpp:384218[regions], [faces], [edges], [vertices]
SmBrep::GetRegionsSmBrep.cpp:385138[regions], [faces], [edges], [vertices]
SmBrep::GetVerticesSmBrep.cpp:385278[regions], [faces], [edges], [vertices]
Module file-header table (43 rows)
RustUpstream
[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]SmBrep::GetType, GetTypeString, GetClassString, IsKindOf
[Brep::tolerance] (in topology.rs)SmBrep::GetTolerance
[Brep::this_model_size_estimate]SmBrep::GetThisModelSizeEstimate
[Brep::set_this_model_size_estimate]SmBrep::SetThisModelSizeEstimate
[Brep::this_large_small_size_ratio]SmBrep::GetThisLargeSmallSizeRatio
[Brep::set_this_large_small_size_ratio]SmBrep::SetThisLargeSmallSizeRatio
[Brep::infinite_region] (in topology.rs), [Brep::set_infinite_region]SmBrep::GetInfiniteRegion, SetInfiniteRegion
[Brep::editing_enabled], [Brep::set_editing_enabled] (in topology.rs)SmBrep::m_bEditingEnabled
[Brep::face_list], [Brep::edge_list], [Brep::vertex_list] (+ set_*_list)m_pFaceListHead, m_pEdgeListHead, m_pVertexListHead (list order)
[Brep::add_deleted_surface], [Brep::deleted_surfaces]SmBrep::AddDeletedSurface, m_pDeletedSurfaces
[num_faces]SmBrep::GetNumFaces
[is_live_topology_member]SmBrep::IsLiveTopologyMember
[regions], [faces], [edges], [vertices]SmBrep::GetRegions, GetFaces, GetEdges, GetVertices
[shells]SmBrep::GetShells
[tessellate_boundaries], [BoundaryTessellation]SmBrep::TessellateBoundaries
[surfaces], [curves]SmBrep::GetSurfaces, GetCurves
[wire_edges], [topological_edges], [topological_vertices]SmBrep::GetWireEdges, GetTopologicalEdges, GetTopologicalVertices
[is_degenerate]SmBrep::IsDegenerate
[reset_infinite_region], [SetRegionVoidType]SmBrep::ResetInfiniteRegion, SmSetRegionVoidType
[set_region_is_void_flags_for_nested_solids]SmBrep::SetRegionIsVoidFlagsForNestedSolids
[heal_brep]SmBrep::HealBrep
[brep_intersect_mut], [brep_intersect_self]SmBrep::BrepIntersect
[create_corner_blend]SmBrep::CreateCornerBlend
[create_edge_edge_blend]SmBrep::CreateEdgeEdgeBlend
[create_parallel_projection_curves], [ParallelProjectionOptions], [ParallelProjectionCurves]SmBrep::CreateParallelProjectionCurves
[update_vertex_edge_intervals]SmBrep::UpdateVertexEdgeIntervals
[LockBrepBox]SmLockBrepBox (constructor, destructor)
[check_uv_trim_curve]sm_CheckUVTrimCurve
[swap_face_uv]sm_SwapFaceUV
[mark_loops_to_delete]sm_MarkLoopsToDelete
[rm_and_del_old_loop_vertices]sm_RmAndDel_OldLoopVertices
[find_sector_of_face]sm_FindSectorOfFace
[vote_for_region], [find_highest_vote]sm_VoteForRegion, sm_FindHighestVote
[redistribute_seam_uv_trim_curves]sm_RedistributeSeamUVTrimCurves
natural_seam_interval (crate)sm_GetNaturalSeamInterval
is_first_nonseparating_seam (crate)sm_IsFirstNonseparatingSeam, sm_SeamIntervalLess
[add_attributes]sm_AddAttributes
[PendingTopologyDelete]SmPendingTopologyDelete (Clear)
[make_vertex_split_uv_trim_curve]sm_MakeVertexSplitUVTrimCurve
[ObjectMap], [set_object_map], [get_object_map]sm_SetObjectMap, sm_GetObjectMap (the copy maps are topology.proto_topology_p1's [CopyBrepMap])
[reverse_reflection_edgeuses]sm_ReverseReflectionEdgeuses
[swap_reflection_shells]sm_SwapReflectionShells
[find_side_of_curve]sm_FindSideOfCurve

Upstream tests reaching this unit

prog_test:my_test_extent3d, prog_test:my_test_vector2d, prog_test:my_test_surface_closest_point, prog_test:my_test_drop_point, prog_test:my_test_matrix, prog_test:my_test_reversed_line_join