topology.face_p3 green
- Layer
- 43
- Upstream lines
- 1,878
- Functions
- 12
- Rust module
topology::face::p3
Status history
- todo 1,881 lines
- partial 1,881 lines
- green 1,881 lines
Source: crates/solidcore/src/topology/face/p3.rs
Upstream: source/SMLib/src/SmFace.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
PR #1409 (2026-10-28), coverage only: independently constructed real plane faces with two/four Hermite edges and actual per-edge tolerances exercise IsDegenerate with skip_quick both ways and optional zone tolerances. New bounded edge-loop source kind14 uses native SmBrepConstructor and Rust new_brep plus equivalent records, preserving the own reader; no kernel parity change. All14 new cases (13 Hermite,1 line control) return native success and matching decisions:10 degenerate,4 nondegenerate, two compared values each. Full unit1927/1927 pass,1924 with values,3 unchanged no-value cases,0 failures/deferred,max_rel_err0; sensitivity14/14. Original1913 cases retained. No owner-tolerance divergence was reproduced, so the proposed production owner-context wiring was not applied; quick-return versus fallthrough is not separately instrumented. GREEN. Touching faces (PR #1283): 132 inline touching_* FaceIntersect cases on one B-rep of planes and canonical spheres, cylinders and tori (block kind 10) compare the touching points classified in place (Point3DClassify on both faces); difftest 1913 cases, 1913 pass, 0 deferred. Earlier (PR #725, FaceIntersect classification objects resolve their topology handles, so PointClassify / FindVertexSector / the edge members reach the B-rep; with #723): difftest 1781 cases, 1781 pass, 0 failed, 0 deferred (was 1604 / 177: topology.edge 127, topology.face_p2 50). main CI e33985411 (2026-10-23): PARTIAL topology.face_p3 cases=1781 passed=1604 failed=0 deferred=177 blocked_by=topology.edge(127),topology.face_p2(50). UV-TRIM OWNER (PR #586, 2026-10-23): a nested smsurf_GetSurfaceCache inside CreateUVTrimCurve(s) no longer builds the face's UV trim curves while the surface owner is cleared (Brep::begin_surface_owner_cleared), so cyl_bspline_uv_trim_plain/own (known mismatches since #463) pass: difftest 1781 cases, 1307 pass, 0 failed, 474 deferred, 0 known mismatches, max_rel_err 0. PARTIAL (PR #139): difftest 1758 cases (1742 fixture in fixtures/topology.face_p3/constructed.json: every op (IsLamina, HasLaminaEdge, HasConsecutiveLaminaEdges, SetTolerance with both flags, Notify PRE_EDIT/POST_EDIT/CHANGE_GEOMETRY/ADD_TO_BREP/RM_FROM_BREP with and without cached gaps, ComputeLoopOrientation with/without UV bounds and 3D-loop flag, IsDegenerate with/without quick check and zone tolerances incl. ones above every edge (all-degenerate TRUE), CreateComposites, CreateUVTrimCurves with/without tolerance adjustment, FaceIntersect with coincidence flag unset/FALSE/TRUE and points) on 7 upstream .smb files (plain and RebuildUVTrimCurves), plane / tilted plane / bilinear / pole / biquadratic faces, the my_test_topology wire network every Endcap face pair, 112 faces with an inner vertex loop (MakeVertexLoop) and 80 CreateUVTrimCurves cases passing the face's own UV curves; 16 generated over the 15 topology.vertexuse files, wire edges, faces and the network),530 pass bit-identical (max_rel_err 0), 0 failed, 1228 deferred (intersect.curve_class_p4 206, topology.edgeuse_p3 420, topology.face_p2 122, topology.face_p4 144; plus 336 import/dispatch-gap deferrals, surface.cone_p1 224 and surface.surf_of_extrusion_p2 112, owned by the SurfaceKind variant work, not by a pending port: the runner's inexact_geometry maps the C++ type codes 15012/15013/15015/15030 to those units). Values compare for the lamina queries, SetTolerance, Notify, ComputeLoopOrientation of an inner vertex loop, and the empty-intersection and all-degenerate FaceIntersect/IsDegenerate cases; CreateComposites, ComputeLoopOrientation of edge loops and CreateUVTrimCurves (also with its own UV curves) compare nothing yet (all deferred, see plan/findings.md); --perturb SENSITIVE; probe 3000 seeds clean. Harness: the topology.vertexuse B-rep blocks and graph import (SmPlane as a plane, SmLine as a line); geometric ops on B-reps holding an analytic surface/curve kind the import keeps only as its B-spline part defer to the kind's unit (as topology.edgeuse_p2). Unported callees stubbed: SmEdgeuse::NormalizedEvaluate, GetOrCreateUVTrimCurve (topology.edgeuse_p3, PR #117), SmFace::GetEdges(outer loop), GetUpwardLoopuses/Edgeuses/Vertexuses, GetBrep (topology.face_p4, PR #134), SmCurveClassification constructor (intersect.curve_class_p4), SmFace::Point3DClassify (query.face_p1). Wired back-edges: heal.heal_data_p1 (CreateUVTrimCurves), boolean.merge_p1 (SetTolerance), and in this unit InsertTopologyIntersections / ExtractGeometry (intersect.curve_class_p5) and SmSurface::CoincidenceCheck (surface.surface_p8) after merging main; topology.vertex (SmFace::SetTolerance), topology.trimming_tools (CreateUVTrimCurves, ComputeLoopOrientation), topology.loopuse (SmFace::Notify around FlipLoopOrientation), heal.heal_data_p2 (SetTolerance, IsDegenerate); wired by merging main (PR #139 round): topology.face_p1 (CreateUVTrimCurves and ten of eleven Notify calls, through topology.loopuse's face_notify_edit environment), geom.tol (SmFace::SetTolerance) and boolean.topology_intersector_p1 (SmFace::FaceIntersect through IntersectorBrep::face_intersect); stubs left with justification in plan/findings.md (query.poly SetOriginalFace Notify, surface.trim_srf_cache CreateUVTrimCurves: opaque face handles; topology.face_p1 SetSurface's CHANGE_GEOMETRY Notify: surfaces have no identity). Upstream defects UB-189, UB-193. CO-PORTED in topology.topology_traverser (PR #113): SmFace::HasLaminaEdge -> topology::topology_traverser::has_lamina_edge (re-exported here); SmFace::GetEdges with default arguments -> topology_traverser::face_edges. [Review round 2026-10-18 (merged main e1ae2640: edgeuse_p3 #117, shell #154, brep_p6 #169): 1774 cases (1758 fixture: + a rational closed B-spline cylinder face (seam; ComputeLoopOrientation 3D/UV with bounds, vertex loop, IsDegenerate, CreateComposites, CreateUVTrimCurves), ComputeLoopOrientation of another face's loop on plane_square.smb, and negative SetTolerance / IsDegenerate tolerances (SmZoneTol3d fabs) from the probe), 700 pass (697 compare values, 3 none; ComputeLoopOrientation of edge loops in 3D now compares orientation, bounds and use states, 43-51 values per case), 0 failed, 1074 deferred (topology.face_p4 268, surface.surface_p2 224, intersect.curve_class_p4 207, topology.face_p2 148, intersect.surface_drop_lib_p3 115, surface.surf_of_extrusion_p2 112), max_rel_err 0, --perturb SENSITIVE. Wired SmEdgeuse::NormalizedEvaluate / GetOrCreateUVTrimCurve (topology.edgeuse_p3); CreateUVTrimCurves reads poles with get_singularities_of_face (no face_p2 stub). The import/dispatch-gap deferrals name surface.surface_p2 (the SurfaceKind dispatch, issue #76) for SmCone/SmCylinder/SmSphere/SmTorus (their own units are green) and surface.surf_of_extrusion_p2 for the extrusion. The shim's -2 null check for ComputeLoopOrientation follows the selected loop (vertex loops never -2). Justified stubs added: topology.brep_p6 MakeFaceTopology SetTolerance (that unit's own unported remainder follows) and topology.edgeuse_p3 EvaluateBinormal's surface cache CreateUVTrimCurves (opaque face handle, as surface.trim_srf_cache).] Batch integration (batch/clean-2026-10-19): the SmCurveClassification constructor is wired to CurveClassification::with_curve (intersect.curve_class_p4); those cases now defer on its ReSet (intersect.curve_class_p2). topology.face_p4 (PR #239) wired GetUpwardLoopuses / GetUpwardEdgeuses / GetUpwardVertexuses (default arguments), GetEdges(outer loop only) and GetBrep (Brep tolerance): after main through cfa9d068: 1781 cases, 823 pass, 0 failed, 958 deferred (main without it: 654/1127). Owner zone-tol cache (surface/owner-zone-tol): 1781 cases, 971 pass, 0 fail, 810 deferred. [2026-10-23 (PR #605): inexact_geometry skips faces the shared export carried exactly (sc_analytic_export.h), so cone/sphere/revolution/extrusion faces compare values; surface.surface_p2 228 and harness:analytic-geometry-export 112 deferrals gone, more cases now reach topology.edge / topology.face_p2 stubs: PARTIAL topology.face_p3 cases=1781 passed=1604 failed=0 deferred=177 max_rel_err=0e0 with_values=1601 no_values=3 vacuous=0 blocked_by=topology.edge(127),topology.face_p2(50)] FaceIntersect across two B-reps (2026-10-23): face_intersect_breps takes each face with its own B-rep (face_intersect is its one-B-rep form); IntersectObject's Surface/EdgeCurve/Trim/Topology carry a side flag (true only for the other face's objects when the B-reps differ, so one-B-rep results are unchanged). Wired: boolean::merge::p4 ArenaPair and the topology_intersector_p1 runner (two operands), topology::brep::p1 brep_intersect, and topology_intersector::p1::face_face_intersect_curves (the UV curve / point outputs, via FaceIntersectWants). No UNPORTED(topology.face_p3) FaceIntersect stub left; every former FaceIntersect deferral now reaches its next blocker (topology.edge, topology.face_p2), 0 failures. UPDATE (owning-face caches in FaceIntersect): the surface intersection runs with the faces' B-reps lent mutably (FaceBreps, SidedFaceServices), so each face surface gets its face's trimmed cache; a face intersected with itself intersects one surface object, as upstream. PARTIAL topology.face_p3 cases=1781 passed=1650 failed=0 deferred=131 blocked_by=topology.edge(131) (was 1604 passed, 177 deferred; every topology.face_p2 deferral is gone).
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,407
- Stored error outcomes
- 3
- 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.extent2d green geom.object green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green surface.surface_p2 partial topology.edge green topology.edgeuse_p1 green topology.edgeuse_p3 green topology.face_p2 partial topology.face_p4 green topology.loopuse green topology.topology green topology.vertex green
Soft dependencies: curve.composite_curve_p1 green curve.curve_p4 green curve.curve_p6 green intersect.curve_class_p1 green intersect.curve_class_p3 green intersect.curve_class_p4 green intersect.curve_class_p5 green intersect.point_class green surface.surface_p1 green surface.surface_p3 green surface.surface_p4 green surface.surface_p5 green surface.surface_p7 green surface.surface_p8 green topology.edgeuse_p2 green topology.vertexuse green
Dependents: blend.feature_executive blocked heal.stitch_p2 green intersect.api_intersectors partial topology.brep_mirror green topology.brep_p2 green topology.brep_p6 green topology.brep_p9 green topology.face_p1 green
Soft dependents: blend.fillet_executive_p3 partial boolean.merge_p1 green boolean.merge_p2 green boolean.topology_intersector_p1 green boolean.topology_intersector_p2 green heal.heal_data_p1 green heal.heal_data_p2 green offset.offset_executive_p1 partial offset.offset_executive_p2 partial primitive.primitive_creation_p2 green primitive.primitive_creation_p3 green query.poly green sweep.topology_sweep green topology.brep_p1 green topology.brep_p3 partial topology.brep_p4 green topology.brep_p5 green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmLoopOrientationSampler::Refine | SmFace.cpp:1722 | 43 | |
SmFace::ComputeLoopOrientation | SmFace.cpp:1797 | 342 | [compute_loop_orientation], [compute_loop_orientation_3d] |
SmFace::CreateComposites | SmFace.cpp:6876 | 61 | [create_composites], [create_composites_with_edges] |
SmFace::CreateUVTrimCurves | SmFace.cpp:8106 | 493 | [create_uv_trim_curves], [create_uv_trim_curves_notified], [UvTrimCurveGaps] |
SmFace::FaceIntersect | SmFace.cpp:11449 | 369 | [face_intersect], [FaceIntersectOptions], [FaceIntersection], [IntersectObject] |
SmFace::Notify | SmFace.cpp:11997 | 72 | [notify] |
SmFace::SetTolerance | SmFace.cpp:14360 | 48 | [set_tolerance] |
SmFace::IsClosedSurfaceWithVertexLoops | SmFace.cpp:15087 | 34 | [is_closed_surface_with_vertex_loops] |
SmFace::IsDegenerate | SmFace.cpp:15154 | 337 | [is_degenerate] |
SmFace::IsLamina | SmFace.cpp:15497 | 19 | [is_lamina] |
SmFace::HasConsecutiveLaminaEdges | SmFace.cpp:15552 | 41 | [has_consecutive_lamina_edges] |
SmFace::HasLaminaEdge | SmFace.cpp:15663 | 19 | [has_lamina_edge] |
Module file-header table (11 rows)
| Rust | Upstream |
|---|---|
[compute_loop_orientation], [compute_loop_orientation_3d] | SmFace::ComputeLoopOrientation |
[create_composites], [create_composites_with_edges] | SmFace::CreateComposites |
[create_uv_trim_curves], [create_uv_trim_curves_notified], [UvTrimCurveGaps] | SmFace::CreateUVTrimCurves |
[face_intersect], [FaceIntersectOptions], [FaceIntersection], [IntersectObject] | SmFace::FaceIntersect |
[notify] | SmFace::Notify |
[set_tolerance] | SmFace::SetTolerance (SM_USE_OLDTOL) |
[is_degenerate] | SmFace::IsDegenerate |
[is_closed_surface_with_vertex_loops] | SmFace::IsClosedSurfaceWithVertexLoops |
[is_lamina] | SmFace::IsLamina |
[has_consecutive_lamina_edges] | SmFace::HasConsecutiveLaminaEdges |
[has_lamina_edge] | SmFace::HasLaminaEdge (CO-PORTED in topology.topology_traverser, re-exported) |
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