intersect.curve_class_p4 green
- Layer
- 34
- Upstream lines
- 336
- Functions
- 4
- Rust module
intersect::curve_class::p4
Status history
- todo 2,022 lines
- partial 2,022 lines
- green 2,022 lines
Source: crates/solidcore/src/intersect/curve_class/p4.rs
Upstream: source/SMLib/src/SmCurveClass.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
2026-10-25 (fix: GetLoopCrossings runs its SetProps_Stage2 on the real B-rep through get_loop_crossings_mut, plan/findings/intersect.curve_class_p4--get-loop-crossings-b-rep-edits-dropped.md): the 6 known mismatches pass; PASS intersect.curve_class_p4 cases=3201 passed=3201 failed=0 deferred=0. 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: of 169 surface.surface_p2 deferrals 163 pass, 6 are known mismatches (gen1570, gen1622, gen1841, gen1876, gen1968, gen2061: torus seam flags). PARTIAL intersect.curve_class_p4 cases=3201 passed=3195 failed=0 deferred=0 max_rel_err=1e0 with_values=3195 no_values=0 vacuous=0 known_mismatch=6. main CI e33985411 (2026-10-23): PARTIAL intersect.curve_class_p4 cases=3201 passed=2921 failed=0 deferred=280 blocked_by=topology.face_p4(280). PR #639 (2026-10-23): difftest 3201 cases, 2918 pass, 0 failed, 283 deferred unchanged in count; the 97 EdgeCurveOnClassify deferrals now run and defer on surface.surface_p2 (trimmed surface cache history: tolerance growth, plan/findings.md), FindVertexSector 186. PARTIAL (PR #137): difftest 3201 cases (201 hand-written edge scripts + 3000 generated), 1318 pass bit-identical (max_rel_err 0), 0 failed, 1883 deferred (intersect.curve_class_p2 1014: ReSet in the constructor, ConnectIntervals in every squeeze, GetMinUV/GetMaxUV at an edge end; topology.face_p4 360: SmFace::HasSeamProblem in SetProps_Stage2 of a closed face; topology.face_p2 376: SmFace::GetTolerance in the zone tolerance of the face-owned surface, a surface.surface_p1/_p4 stub reached by the seam sampling; topology.edge 82 and topology.vertex 51: SmEdge::GetCurve / SmEdge::IsConnectedTo / SmVertex::IsConnectedTo in PointClassification::curve_object and is_connected_to, reached by the touch lists); --perturb SENSITIVE 1318/1318. Review round 2 (PR #137): GetPointClassifiesConnectedTo wired to intersect.curve_class_p7 (PR #65 merged: 1076 -> 1318 pass, 2125 -> 1883 deferred). Harness: the shim builds a real one-face B-rep with SmBrepConstructor (shared harness/cpp/shim/sc_one_face_brep.h with heal.face_props: plane, cylinder and sphere faces from SmSurfOfRevolution::CreateCanonical, closed or open, plus the heal.face_props face generator; vertex loops and edge loops of line edges, NURBs made on both sides), rebuilt record by record in Rust (heal_face_props::rust_brep); the topology stand-ins are gone. Compared: 374 passing cases run GetLoopCrossings over real loops up to the touch list (loop -> face, SetProps_Stage2 through the hook or face props preset at stage >= 2a by seeds, the props snapshot, surface, IsClosed/IsDegenerate and the no-crossings return of a degenerate classification curve); 400 passing cases run GetIvlBound_EdgeuseObj on the real face (upward face use, surface, the NULL return of a non-edge end); the squeeze and the constructor compare 0 cases beyond the empty-classification rejection (both defer on intersect.curve_class_p2); every edge end and the touch lists that reach an unported IsConnectedTo defer. Not reachable: a face without surface. Topology members go through the defaulted ClassGeometry::topology_entity / topology_handle hooks (CO-PORTED into intersect.point_class; implemented by topology::face::p2 FaceClassifyObjects and the difftest pool); unresolved handles are InvalidInput. FaceProps::set_props_stage2 InvalidInput (UB-131 null m_pFace) now propagates from GetLoopCrossings, and the FFI guard rejects seeded props that reach it (stage GAPSa/GAPS without field 24). Stubs: UNPORTED(intersect.curve_class_p2) (PR #85, still open); none left for intersect.curve_class_p7 (wired); SmEdgeuse::EvaluateBinormal wired to topology.edgeuse_p3 (PR #117) after merging main: it runs on a copy of the B-rep (bUse3DOnly TRUE creates no UV trim curve); counts unchanged, 1318 pass / 1883 deferred, --perturb SENSITIVE 1318/1318; the status of both EvaluateBinormal call sites is ignored as upstream (a failure leaves the out-vectors as C++ does: point (0,0,0) after the output init, untouched for a non-loop edge use; only Unported and a null-dereference InvalidInput propagate), and the first site keeps its out-vectors across the 10 samples as upstream declares them outside the loop (no difftest case reaches a failing EvaluateBinormal yet: counts unchanged). Wired: topology::face::p2 (constructor x3, CurveOnClassify of query.face_p2; GetPointsInFace site passes dTol, no borrowed data), intersect::topology_solver::p2 (constructor, zone_tol3d of the solver tolerance; its CurveOnClassify stays justified: the solver adapter has no face -> Brep resolution), intersect::curve_class::p6 (sm_SqueezeOutSmallestInterval), topology::proto_topology::p3 (constructor); crv_in_volume / crv_on_surf constructor stubs retagged UNPORTED(intersect.curve_class_p2): SmCurveClassification::ReSet (no Kernel under Curve::knots; plan/findings.md). CO-PORTED in blend.hcr (PR #191): SmCurveClassification::SmCurveClassification(cpCurve, crInterval, NULL, tol, n, pData) with its ReSet (new curve) -> blend::hcr::new_curve_classification (on CurveClassification::with_curve_interval, SM_UNINIT_TOL for a non-positive tolerance) (kept beside the PR #137 constructor: blend.hcr builds it on CurveClassification::with_curve_interval and does not defer on ReSet). Wired to intersect.curve_class_p2 (wire/curve-class-p4): ReSet in the constructor, ConnectIntervals in sm_SqueezeOutSmallestInterval and SmCurveInterval::GetMinUV / GetMaxUV in GetIvlBound_EdgeuseObj (which now takes the Kernel, as does topology::face::p2::review_start_and_stop_on_seam_crv_classifies); no UNPORTED(intersect.curve_class_p2) stub is left here. difftest 3201 cases: 2224 pass (was 1319), 0 failed, 977 deferred (topology.face_p2 566, topology.face_p4 411); max_rel_err 0. New shim guard: GetLoopCrossings over loops on an empty classification (left by squeezing its only interval) is rejected, since GetPointClassifiesConnectedTo reads m_pData[0] (Rust: InvalidInput). Callers that now get past the constructor: heal.heal_data_p2 469 -> 483 pass, heal.heal_data_p3 329 -> 344, heal.stitch_p2 332 -> 337, topology.face_p3 823 -> 888; topology.brep_p2's merge_plane10_line now reaches CurveOnClassify, whose topology its MergeObjects adapter cannot resolve (merge_curves_on_surface holds the B-rep mutably), and defers as topology.brep_p2. The shared .smb import of the difftest runners (topology_edgeuse_p1::import) now sets each face's m_pFU (its SM_OT_SAME face use; the export does not carry it): without it topology.shell's region-order cases on Mouse.smb / box_with_large_fillet.smb reached CurveOnClassify through IsInnerShell with no upward face use and failed; they now defer deeper (crv_on_surf, topology.edge). Full sweep after merging main (7eb93aa4): 238 units, 0 failed. Owner zone-tol cache (surface/owner-zone-tol): 3201 cases, 1740 pass, 0 fail, 1461 deferred. UPDATE (closed revolution UV trim curves in pool build): difftest 3201 cases: 2900 pass (was 1740/2224), 0 failed, 301 deferred (query.face_p1 25, topology.face_p4 276); max_rel_err 0e0; upstream C++ SmTrimSrfCache creates UV trim curves on closed/periodic revolution faces during stage 2 props, expanding vertex tolerances.
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
- 5,410
- Stored error outcomes
- 0
- 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.extent1d green geom.extent2d green geom.object green geom.tol green geom.vector2d green geom.vector3d green intersect.curve_class_p1 green intersect.curve_class_p2 green intersect.curve_class_p7 green intersect.point_class green surface.surface_p7 green
Soft dependencies: geom.periodic_extent1d green surface.surface_p1 green surface.surface_p2 partial surface.surface_p4 green surface.surface_p5 green
Dependents: intersect.curve_class_p6 green
Soft dependents: blend.fillet_solver_p5 green blend.fillet_standard_solver_p2 green blend.hcr green boolean.topology_intersector_p1 green boolean.topology_intersector_p3 green heal.gap green intersect.topology_solver_p2 green primitive.primitive_creation_p3 green query.face_p4 green topology.brep_p2 green topology.brep_p7 green topology.face_p2 partial topology.face_p3 green topology.face_p4 green topology.proto_topology_p3 green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
sm_SqueezeOutSmallestInterval | SmCurveClass.cpp:3774 | 27 | [squeeze_out_smallest_interval] |
SmCurveClassification::SmCurveClassification | SmCurveClass.cpp:5001 | 73 | [CurveClassification::with_curve], [ClassificationInit] |
SmCurveClassification::GetLoopCrossings | SmCurveClass.cpp:13143 | 138 | [CurveClassification::get_loop_crossings], [LoopCrossings] |
SmCurveInterval::GetIvlBound_EdgeuseObj | SmCurveClass.cpp:20613 | 98 | [CurveClassification::ivl_bound_edgeuse_obj] |
Module file-header table (7 rows)
| Rust | Upstream |
|---|---|
[CurveClassification::with_curve], [ClassificationInit] | SmCurveClassification(cpCurve, crInterval, cpUVCurve, sSrcZoneTol3d, lOptDataSize, pOptBorrowedData, bIsCurveOwned, bIsCurveCurrent, cpSurface1, cpSurface2, cpUVCurve2, cpTI) |
[CurveClassification::get_loop_crossings], [LoopCrossings] | SmCurveClassification::GetLoopCrossings |
[CurveClassification::get_loop_touches] | SmCurveClassification::GetLoopTouches |
classify_seam_edgeuse (private) | sm_ClassifySeamEdgeuse (static) |
find_edgeuse_seam_sides (private) | sm_FindEdgeuseSeamSides (static) |
[CurveClassification::ivl_bound_edgeuse_obj] | SmCurveInterval::GetIvlBound_EdgeuseObj |
[squeeze_out_smallest_interval] | sm_SqueezeOutSmallestInterval (static) |
Upstream tests reaching this unit
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, SM_API_test:TestSmCreateRectangle, SM_API_test:TestSmCreateRegularPolygon