query.face_p2 green
- Layer
- 43
- Upstream lines
- 1,161
- Functions
- 7
- Rust module
query::face::p2
Status history
- todo 1,161 lines
- partial 1,161 lines
- green 1,161 lines
Source: crates/solidcore/src/query/face/p2.rs
Upstream: source/SMLib/inc/SmProtoTopology.h, source/SMLib/src/SmFace.cpp, source/SMLib/src/SmProtoTopology.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
2026-10-30 (the Rust side now builds every non-file B-rep itself, crate::own_builder::build_with for the wire, face, network and other shared sources, then its own apply_edits, renumbered into the shim's walk order under Conventions::EDGEUSE_GRAPH; .smb files were already read by the Rust reader; it no longer imports the C++ export; the C++ side now passes its selectors and point specifications to the shim, which resolves them on its live edited SmBrep instead of on the flattened export, so the inexact_geometry exclusion is gone; shared helper: topology_face_p2::import no longer returns the Exact flags, which only this runner read): the previous GREEN below rested on Rust-side inputs imported from the C++ build for every non-file case, so those cases compared the C++ B-rep with itself, and excluded faces the export could not carry exactly; counts to be re-measured. GREEN (2026-10-25, PR #970): all 1401 cases pass (1374 with values, 27 both_errored, 0 failed, 0 deferred, max_rel_err=0e0, --perturb SENSITIVE) with PR #754 on main; bare-surface fallback arms marked DISPATCH GAP. PARTIAL (PR #800): difftest 1401 cases (1101 fixture: grids over the 13 exactly exported faces of the upstream .smb files Endcap, Mouse, box_with_large_fillet, disk, ellips_ts2, plane_circ, plane_square; points on, near and at the ends of every trim curve at offsets 0..1e-3; target-loop selections on ellips_ts2's face with two inner loops; SM_API_test TestSmCreateRectangle's 10x6 rectangle at the origin and at 1e10 on a real SmPlane; sm_ClassifyParamOnFaces face pairs; SmProtoVertex containment at the tolerance/capture limits; CurveOnClassify; trim-cache fixtures from #826; 300 generated incl. tiny/huge B-spline and plane faces, tolerance edits and out-of-domain points), 1400 passed, 0 failed, 1 deferred (blocked_by=surface.surface_p2(1), gen0142 awaiting PR #754), bit-identical (max_rel_err 0); --perturb SENSITIVE. In PR #800: implemented topology_entity and topology_handle on Objects to resolve SmEdge::GetCurve and SmFace::Point3DClassify, matched SM_UNINIT_TOL default in CurveOnClassify, and wired face_surface_cache in Point3DClassify (query.face_p1). main CI e33985411 (2026-10-23): PARTIAL query.face_p2 cases=1344 passed=1326 failed=0 deferred=18 blocked_by=query.face_p1(4),topology.edge(14). After intersect.curve_class_p2 (PR #85) merged: CurveOnClassify cases now compared (status, modified flag, every interval and its three point classifications; line is SmBSplineCurve::CreateLineSegment on both sides): 1344 cases, 1310 pass, 0 fail, 34 deferred; --perturb 1310/1310. PARTIAL: difftest 1344 cases (1044 fixture: grids over the 13 exactly exported faces of the upstream .smb files Endcap, Mouse, box_with_large_fillet, disk, ellips_ts2, plane_circ, plane_square; points on, near and at the ends of every trim curve at offsets 0..1e-3; target-loop selections on ellips_ts2's face with two inner loops; SM_API_test TestSmCreateRectangle's 10x6 rectangle at the origin and at 1e10 on a real SmPlane; sm_ClassifyParamOnFaces face pairs; SmProtoVertex containment at the tolerance/capture limits; CurveOnClassify; 300 generated incl. tiny/huge B-spline and plane faces, tolerance edits and out-of-domain points), 1309 pass bit-identical (max_rel_err 0), 0 failed, 35 deferred (intersect.curve_class_p2 20: SmCurveClassification::ReSet, the first call of CurveOnClassify, whose body also needs curve_class_p5/p7/p9 and topology.face_p4 GetEdges; intersect.surface_drop_lib_p3 15: SmSurface::DropCurve in GetOrCreateUVTrimCurve of faces without trim curves); --perturb SENSITIVE. Not compared: PointClassify's SmTrimSrfCache branch (the shim deletes the cache a file read leaves; B-rep surfaces carry no object cache in the port) and faces with surfaces of revolution/extrusion/cones/spheres/tori (the shared export carries them as B-spline parts). Built on topology.loopuse (PR #102: loopuse::vertices). Wired: SmProtoVertex::ContainsPoint in ProtoTopologyManager::find_proto_vertex / which_pv_to_combine (topology.proto_topology_p1: 63 cases no longer deferred). Not wired, still UNPORTED(query.face_p2): surface::trim_srf_cache, intersect::ray_tracer, intersect::topology_solver p1 (callers hold object handles without a Brep) and the CurveOnClassify calls of topology::face::p2 / intersect::topology_solver p2 (behind UNPORTED(intersect.curve_class_p4)). CO-PORTED in intersect.curve_class_p5 (PR #150): CurveOnClassify vertex handle mapping -> CurveOnClassifyObjects::vertex and ClassGeometry callback bound; IntersectVertices now calls p5. Existing ReSet and classification stubs are retained. Merge of PR #65: ClassifyFaceInterval (p7) and IntersectVertices (p5) both wired; difftest then 1344 cases, 1271 passed, 0 failed, 73 deferred. [topology.edgeuse_p3 wired (PR #117): SmLoop::ContainsUVPoint takes &mut Brep and calls GetOrCreateUVTrimCurve, so the former topology.face_p2 (38) and topology.edgeuse_p3 (15) deferrals are gone: 1344 cases, 1309 pass, 0 failed, 35 deferred (intersect.curve_class_p2 20, intersect.surface_drop_lib_p3 15)]
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
- 1,401
- 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: geom.a_object green geom.extent2d green geom.object green geom.tol green geom.vector3d green intersect.curve_class_p1 green intersect.point_class green topology.face_p2 partial topology.face_p4 green
Soft dependencies: curve.curve_p2 green curve.curve_p4 green geom.vector2d green intersect.curve_class_p2 green intersect.curve_class_p5 green intersect.curve_class_p7 green intersect.curve_class_p9 green nurbs.b_spline_surface_p1 green query.loop green surface.surface_cache_p3 green surface.surface_p1 green surface.surface_p2 partial topology.edge green topology.vertex green
Dependents: intersect.api_intersectors partial query.face_p1 green query.face_p3 green topology.brep_validation green
Soft dependents: blend.fillet_solver_p5 green blend.fillet_standard_solver_p2 green boolean.topology_intersector_p1 green boolean.topology_intersector_p3 green primitive.primitive_creation_p3 green query.api_queries green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmProtoVertex::DistanceTo | SmProtoTopology.h:480 | 1 | [proto_vertex_distance_to] |
SmProtoTopologyManager::GetCaptureDistance | SmProtoTopology.h:780 | 1 | [ProtoTopologyManager::capture_distance] |
SmFace::CurveOnClassify | SmFace.cpp:8666 | 333 | [curve_on_classify], [CurveOnClassifyObjects] |
SmFace::PointClassify | SmFace.cpp:12137 | 750 | [point_classify], [point_classify_prepared], [PointClassifyOptions] |
sm_ClassifyParamOnFaces | SmProtoTopology.cpp:189 | 68 | [classify_param_on_faces] |
SmProtoVertex::GetCaptureDistance | SmProtoTopology.cpp:1912 | 2 | [proto_vertex_capture_distance] |
SmProtoVertex::ContainsPoint | SmProtoTopology.cpp:1920 | 6 | [proto_vertex_contains_point] |
Module file-header table (16 rows)
| Rust | Upstream |
|---|---|
[point_classify], [point_classify_prepared], [PointClassifyOptions] | SmFace::PointClassify |
[curve_on_classify], [CurveOnClassifyObjects] | SmFace::CurveOnClassify |
[curve_on_classify_mut], [CurveOnClassifyBrep], [FaceBrep] | SmFace::CurveOnClassify on the face's own B-rep |
[classify_param_on_faces] | sm_ClassifyParamOnFaces (file static) |
[proto_vertex_distance_to] | SmProtoVertex::DistanceTo |
[proto_vertex_capture_distance] | SmProtoVertex::GetCaptureDistance |
[proto_vertex_contains_point] | SmProtoVertex::ContainsPoint |
[proto_vertex_containment_radius] | fork SmProtoVertex::GetContainmentRadius |
[ProtoTopologyManager::capture_distance] | SmProtoTopologyManager::GetCaptureDistance (already in topology::proto_topology) |
[face_vertices] | SmFace::GetVertices(SmTArray&, ..) (CO-PORTED, topology.face_p4) |
ClassObject for EntityRef | the SmObject* of a classification of B-rep topology |
[BrepCacheFace] | GetFace() of a face surface's trimmed cache (SmTrimSrfCache::BuildTree, PointClassify) |
[face_surface_cache], [FaceSurfaceCache], [note_face_surface_cache] | smsurf_GetSurfaceCache(GetSurface()) through SmCacheMgrTSrf::CacheMakeOrValidate |
[owned_surface_cache], [solve_surface_cache_of_face] | smsurf_GetSurfaceCache(pSurface) / GetTree of a face-owned surface (a solve's cache) |
[surface_cache_state_of_face] | smsurf_GetSurfaceCache(pSurface) of a face-owned surface without GetTree |
[face_cache_tree] | SmSurfaceCache::GetTree of a face surface's trimmed cache |
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