query.face_p4 green
- Layer
- 45
- Upstream lines
- 1,506
- Functions
- 1
- Rust module
query::face::p4
Status history
- todo 1,432 lines
- partial 1,432 lines
- green 1,432 lines
Source: crates/solidcore/src/query/face/p4.rs
Upstream: source/SMLib/src/SmFace.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
2026-10-31 (nightly fuzz00209, run 41040730716: a UV line ending at v = 1e300 timed out on the Rust side): the runner's Rust side applies the FFI's checks (solidcore_ffi query_face_p4::validate, split out of eval) to the same input as the C++ side, so an input the FFI refuses is a harness error on both sides; regression crates/difftest/tests/fuzz_corpus/query.face_p4.json, plan/findings/query.face_p4--line-end-1e300-rust-side-runs-past-fuzz-limit-fuzz00209.md. GREEN (2026-10-25, after PR #949 resolved the last 2 known mismatches): PASS query.face_p4 cases=503 passed=503 failed=0 deferred=0 max_rel_err=0e0 with_values=476 no_values=27 vacuous=0; --perturb SENSITIVE 503/503. 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: the 5 surface.surface_p2 deferrals pass (2 earlier known mismatches keep it partial). PARTIAL query.face_p4 cases=500 passed=498 failed=0 deferred=0 max_rel_err=0e0 with_values=471 no_values=27 vacuous=0 known_mismatch=2. PARTIAL: difftest 459 cases (59 fixture + 400 generated), 359 pass (332 compare classifications, 27 both rejected or unbuilt), 0 failed, 100 deferred (topology.face_p2 100: SmFace::GetTolerance of the face-owned surface; re-run in PR #132 after merging main with SmEdgeuse::EvaluateBinormal wired; earlier 358 pass / 101 deferred with topology.edgeuse_p3 49, before that query.face_p3 86); max_rel_err 0; --perturb detected all perturbed cases. The shim builds real SmCylinder/SmSphere/SmTorus/SmCone faces with MakeFaceWithCurves (no-area loops of missing-seam faces: cylinder circles, sphere caps and bands with and without pole vertex loops, torus bands and diagonals, seam-straddling area loops nested up to 3 deep; scales 1e-3..1e3, swapped UV, near-pole and near-coincident loops), natural faces (my_test_closed_sphere_properties), B-spline/plane faces and .smb files; the face props are built as SetProps_Stage3 builds them and exported to the Rust side (both run ClassifyLoops on the same props). Builds on PR #122 (heal.face_props: SmFaceProps, SmLooptreeItem, SmClassifyLoopIO, ClassifyLoopsOut) and PR #85 (intersect.curve_class_p2: SmCurveClassification::ReSet), both merged into the branch. Wired UNPORTED(query.face_p4) in heal::face_props::set_props_stage3 (status ignored as upstream). Stubs: UNPORTED(intersect.curve_class_p4) SmCurveClassification::GetLoopCrossings (UNPORTED(query.face_p3) sms_FindAndClassifyLoopBisector wired by PR #132; the runner's handles became an enum H that can name the bisector's curves). LoopObject gained as_loop/as_vertex; LoopuseType gained Zero (SmTArray::SetSize zero-fills new SmClassifyLoopIO records). 1 fns; largest: SmFace::ClassifyLoops; cycle back-edges (call into later units; stub or co-port): heal.face_props(7); unit-SCC #22 (220 units); 59 upstream test entry points reach this unit Review fixes (PR #129, 2026-10-20): the shim starts ClassifyLoops' out-params from SM_HNF_NO_LOOP_TREE_ROOT/SM_CD_LAMINA as the runner does (the SM_ERR no-loops early return failed the gate before); +41 adversarial fixture cases (fixtures/query.face_p4/adversarial.json); classify_loops borrows the done touch list. After merging main: 500 cases, 395 pass, 0 failed, 105 deferred (topology.face_p2 105), max_rel_err 0. GetLoopCrossings wired (PR #717): the stale UNPORTED(intersect.curve_class_p4) stub is replaced by the real call and the runner exports the props the bisector reads (zone tolerance, no-vertex poles, pole points, missing seam direction); 500 cases, 481 pass (454 compare classifications, 27 both rejected or unbuilt), 0 failed, 17 deferred (topology.face_p4 14: SmFace::FindVertexSector; surface.surface_p2 3: trimmed surface cache tolerance growth), 2 known mismatches (gen0157, gen0300: importer curve approximation at scale 1e-3, plan/findings.md).
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
- 505
- Stored error outcomes
- 25
- 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.context green geom.object green intersect.curve_class_p1 green query.face_p3 green topology.face_p2 partial topology.loopuse green topology.topology green
Soft dependencies: geom.vector3d green intersect.curve_class_p2 green intersect.curve_class_p4 green intersect.point_class green topology.vertex green
Dependents: none
Soft dependents: heal.face_props green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmFace::ClassifyLoops | SmFace.cpp:4218 | 1506 | [classify_loops] |
Module file-header table (4 rows)
| Rust | Upstream |
|---|---|
[classify_loops] | SmFace::ClassifyLoops |
[ClassifyLoopsOut] | its out-params reClassifiable, rClassifyLoopIOs, reClassifyCrv_StartType, reClassifyCrv_StopType, rOrderedNoAreaIndices, rpLooptreeRoot |
[ZEROED_CLASSIFY_LOOP_IO] | the record SmTArray<SmClassifyLoopIO>::SetSize adds |
impl LoopObject for EntityRef | the SmObject* of a touch connected to a loop or of a vertex point classification |
Upstream tests reaching this unit
prog_test:my_test_closed_sphere_properties, prog_test:my_test_squeeze_edge_tracks_removal, prog_test:my_test_missing_poles_refreshes_all_faces, SM_API_test:TestSmHealBrep, SM_API_test:TestSmHeal, prog_test:my_test_MakeFace, pt_TestFiles/MakeFace/ApproximateSphere.smp