query.face_p3 green
- Layer
- 44
- Upstream lines
- 1,625
- Functions
- 4
- Rust module
query::face::p3
Status history
- todo 1,620 lines
- partial 1,620 lines
- green 1,620 lines
Source: crates/solidcore/src/query/face/p3.rs
Upstream: source/SMLib/src/SmFace.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
Green again (2026-10-27): the sphere-pole internal-point mismatch after the v1.0.1 pin move was a harness gap (a load-time healer trimmed-surface cache in the C++ shim); the shim now drops it before CalculateAnInternalPoint (plan/findings/query.face_p3--sphere-pole-internal-point-v1-0-1--addendum-2026-10-27-load-time-cache.md). 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: GREEN: the 36 surface.surface_p2 deferrals pass. PASS query.face_p3 cases=1199 passed=1199 failed=0 deferred=0 max_rel_err=7.784285654409864e-11 with_values=964 no_values=235 vacuous=0. PR #639 (2026-10-23, WithMadeTrimCurves pass-through + mutable face queries in ClassifyFaceInterval): difftest 1199 cases, 1087 pass, 0 failed, 112 deferred (was 1000 / 199): query.face_p1 EdgeCurveOnClassify 110 and FindVertexSector 10 resolve or relabel; topology.edge 42, query.face_p2 PointClassify 37, surface.surface_p2 22 (trimmed surface cache history: a face query raising a tolerance, plan/findings.md). PARTIAL (PR #132; review fixes 2026-10-19): difftest 1199 cases (201 fixture: CalculateTightBoundingBox / CalculateAnInternalPoint / the loop bisector over every face of the 13 upstream TestFiles .smb files of unit topology.edgeuse_p1 (with and without RebuildUVTrimCurves), SmApiFaceBoundingBox(TRUE) planar faces (TestSmBrep.cpp:3023) and the holed-box top face of TestSmIntersectors.cpp:405 flat and tilted, SectorClassifyCurveOn on plane_square.smb at every edge use (edge interior, vertex with the CW neighbour, radial; 3D lines in, out and reversed, UV lines, singular); 398 review adversarial fixtures (fixtures/query.face_p3/review_adversarial.json: plane and flat B-spline faces, sector sweeps over the .smb files); 600 generated: SmPlane faces at scales 1e-3..1e3, B-spline faces (flat and curved, degrees 1..3) with rectangle / circle trims and holes, CreateFaceFromSurface faces, .smb files, real SmCylinder/SmSphere/SmTorus/SmCone faces; sector edge fractions 0/1/1e-6, tolerances 0..1e-3, uv_space_okay on/off), 523 pass (288 compare values, 235 both inexact_geometry, rejected or the same status), 0 failed, 676 deferred (topology.face_p2 305: SmFace::GetTolerance of a face-owned surface in the global solves of CalculateTightBoundingBox and DropPoint of the bisector; intersect.surface_drop_lib_p3 215 and topology.face_p3 55: SmSurface::DropCurve / SmFace::CreateUVTrimCurves reached through SmEdgeuse::EvaluateBinormal and, for CalculateAnInternalPoint, CurveOnClassify; curve.crv_on_surf 99: SmCrvOnSurf over an SmPlane; query.face_p2 2); max_rel_err 0; --perturb 523/523 detected. Per function, values are compared only for SmFace::CalculateTightBoundingBox (192 cases) and SmFace::SectorClassifyCurveOn (96); sm_FaceClassifyUVLine (through CalculateAnInternalPoint, 97 cases) and sms_FindAndClassifyLoopBisector (154 cases) never compare values: every case defers or both sides return the same status. sm_FaceClassifyUVLine is file-static: compared through SmFace::CalculateAnInternalPoint. Builds on PR #129 (query.face_p4, with #122 heal.face_props and #85 intersect.curve_class_p2) merged into the branch; the shim compiles the query.face_p4 shim's B-rep builders into its translation unit. Wired UNPORTED(query.face_p3): sms_FindAndClassifyLoopBisector in query::face::p4 (classify_loops returns InvalidInput for a handle type that cannot name the bisector's curves; the library's own healer handle topology::brep::p1::HealLoopHandle is now an enum that names them, as are the query.face_p4 and heal.face_props runner handles), sm_FaceClassifyUVLine in topology::face::p2::calculate_an_internal_point, SmFace::CalculateTightBoundingBox in query::api_queries::face_bounding_box. The bisector's seam flags are written through find_and_classify_loop_bisector_into (upstream's reference out-params: initialised after the domain check, kept when it fails later, read by ClassifyLoops). Also wired: SmEdgeuse::EvaluateBinormal (topology.edgeuse_p3); SmCurveClassification::ReSet in query::face::p2 and heal::face_props came from main (PR #85). LoopObject gained from_face/from_face_surface/from_classify_curve (default None). FFI guard: the tight op rejects B-rep values beyond 1e6 (TIGHT_MAX_COORD; upstream's global solves take minutes at 1e10..1e300, not undefined). Not compared: the shim's sector orientations are always eu1 SAME / eu2 OPPOSITE (the OPPOSITE tangent flip and PART 2's eu2/mate vertex use choices are not reached), and the tight op's has_trim_cache output is not asserted. Upstream SmTArray::FindElementInMaskedArray tests mask & (1<ii) (kept; plan/upstream-issues.md). 4 fns; largest: SmFace::SectorClassifyCurveOn, sms_FindAndClassifyLoopBisector, SmFace::CalculateTightBoundingBox, sm_FaceClassifyUVLine; unit-SCC #22 (220 units); 317 upstream test entry points reach this unit. Merged main 2026-10-20 (query.face_p1, PR #238): its CO-PORTED SmClassifyProblem is kept in query::face::p1 and re-exported from query::face::p3 (this unit's copy removed); query::face::p1's UNPORTED(query.face_p3) SmFace::SectorClassifyCurveOn (EdgeCurveOnClassify: same edge use SAME/OPPOSITE, no singularity) and CalculateTightBoundingBox stubs wired. Re-run: query.face_p3 1199 cases, 523 pass, 0 failed, 676 deferred (unchanged); query.face_p1 2224 cases, 1570 pass, 654 deferred, 0 failed; query.api_queries 1203 cases, 748 pass, 455 deferred, 0 failed; max_rel_err 0. Owner zone-tol cache (surface/owner-zone-tol): 1199 cases, 543 pass, 0 fail, 656 deferred. query::face::p2::curve_on_classify now supplies the bHasBigGaps vertex/face gaps (GetVertexuseOfFace -> GetVertexFaceGap, B-rep snapshot); the 75 bisector cases that failed without them now defer on the SmCrvOnSurf knots stub (intersect.curve_class_p2 ReSet, 75); 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
- 1,199
- Stored error outcomes
- 37
- 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.crv_on_surf green curve.curve_p2 green curve.line green geom.extent1d green geom.extent2d green geom.extent3d green geom.object green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green query.face_p2 green surface.surface_p2 partial surface.surface_p7 green topology.edge green topology.edgeuse_p1 green topology.face_p2 partial topology.face_p4 green topology.loopuse green topology.topology green
Soft dependencies: intersect.curve_class_p1 green intersect.curve_class_p2 green intersect.curve_class_p7 green intersect.point_class green query.edge green query.loop green surface.surface_p1 green surface.surface_p4 green surface.surface_p5 green topology.edgeuse_p3 green topology.vertex green topology.vertexuse green
Dependents: query.face_p1 green query.face_p4 green topology.brep_planar_section partial
Soft dependents: query.api_queries green query.brep green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmFace::CalculateTightBoundingBox | SmFace.cpp:959 | 140 | [calculate_tight_bounding_box], [calculate_tight_bounding_box_into] |
sm_FaceClassifyUVLine | SmFace.cpp:1105 | 59 | [face_classify_uv_line] |
sms_FindAndClassifyLoopBisector | SmFace.cpp:2457 | 595 | [find_and_classify_loop_bisector], [LoopBisector] |
SmFace::SectorClassifyCurveOn | SmFace.cpp:13138 | 831 | [sector_classify_curve_on], [SectorEdgeuse], [SectorClassifyInput], [SectorClass] |
Module file-header table (11 rows)
| Rust | Upstream |
|---|---|
[calculate_tight_bounding_box], [calculate_tight_bounding_box_into] | SmFace::CalculateTightBoundingBox |
face_directed_max (WR-588), cell_directed_max, cell_monotone, cell_division (WR-651) | sm_FaceDirectedMax, sm_CellDirectedMax, sm_CellMonotone (the fork tangency-labs/smlib@9d44c1b), sm_CellDivision (tangency-labs/smlib@326de73) |
[face_classify_uv_line] | sm_FaceClassifyUVLine (file static) |
[face_classify_uv_line_mut] | sm_FaceClassifyUVLine (in place) |
[find_and_classify_loop_bisector], [LoopBisector] | sms_FindAndClassifyLoopBisector |
[sector_classify_curve_on], [SectorEdgeuse], [SectorClassifyInput], [SectorClass] | SmFace::SectorClassifyCurveOn |
[ClassifyProblem] (re-export of [crate::query::face::p1::ClassifyProblem]) | SmClassifyProblem (SmCurveClass.h) |
[ClassifyCurveObjects], [LoopObjectCurves] | the curves ReSet stores in an SmCurveClassification |
surface_is_planar, surface_bounding_box (private) | SmSurface::IsPlanar, SmSurface::CalculateBoundingBox of the face's surface |
find_element_in_masked_array (private) | SmTArray::FindElementInMaskedArray |
[check_face_coordinates] | none (HANG-29 guard) |
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