solidcore

Units / topology

topology.face_p2 partial

Layer
35
Upstream lines
1,884
Functions
34
Rust module
topology::face::p2

Status history

Oct 12Nov 25
  1. todo 1,827 lines
  2. partial 1,827 lines
  3. green 1,827 lines
  4. partial 1,884 lines

Source: crates/solidcore/src/topology/face/p2.rs

Upstream: source/SMLib/inc/SmFace.h, source/SMLib/src/SmFace.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

[2026-11-05 (#1435): PARTIAL, 47 known mismatches: the iso-curve integral runs between the surface's v knots (WR-494); 5 listed cases move again (plan/findings/mass.integrator--split-at-surface-knots-default-moves-cases-2026-11-05.md)] [2026-11-05 (#1556): PARTIAL, 47 known mismatches: SmODEAreaIFEO's port writes the integrand (zero) where the trim's du/dt is zero instead of leaving the array, and the iso-curve integral's steps take the fifth-order estimate too (plan/findings/mass.integrator--quadrature-step-estimate-moves-cases-2026-11-05.md)] 2026-10-31 (nightly fuzz00020, run 41040730716: a face surface with one rational control point timed out on the Rust side): the runner's Rust side applies the FFI's checks (solidcore_ffi topology_face_p2::validate, split out of eval; the B-rep block before the build, the arguments against the Rust B-rep's own counts) 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/topology.face_p2.json, plan/findings/topology.face_p2--mixed-rationality-rust-side-runs-past-fuzz-limit-fuzz00020.md. 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). GREEN (PR #725, SmFace::PointClassify wired in ClassifyFaceInterval; CalculateAnInternalPoint UV lines resolve their topology; classification reads tolerances from the snapshot its trimmed cache raised): difftest 2692 cases, 2692 pass, 0 failed, 0 deferred (was 2611 / 81: query.face_p2 PointClassify 34, topology.edge GetCurve 47). PR #639 (2026-10-23, WithMadeTrimCurves pass-through + mutable face queries): difftest 2692 cases, 2596 pass, 0 failed, 96 deferred (was 2532 / 160): topology.edge 47, query.face_p2 PointClassify 33, topology.face_p4 FindVertexSector 16. PARTIAL: difftest 2692 cases (1176 fixture: upstream-derived (smMergeTest GetPointsInFace(1) on plane and B-spline faces, TestSmBrep ComputePreciseProperties layouts for all 63 flag sets and the iso-curve/area integrands at offset origins, thicknesses 0/0.1, accuracies 1e-3/1e-5, smTopoTest CreateCurvesByTrimming, TestSmTrimmedSurfaces GetOuterLoops) plus edge cases (degenerate and EFF_ZERO-limit UV domains, sm_FixUVTrimCurves gap limits EFF_ZERO/10 and min-size/20, tiny 1e-4 / huge 1e4 / pinched / sub-domain B-spline faces, real SmPlanes, sm_CheckSeamCrossing 90% jumps); 16 generated + 1500 more generated in code), 2322 pass, 0 fail, 370 deferred (topology.edgeuse_p3 156, curve.crv_on_surf 74, topology.face_p3 63 (CalculateUVDomainFromUVTrimCurves wired by topology.face_p1, PR #148; now CreateUVTrimCurves), query.face_p3 47, intersect.curve_class_p4 30; the 112 thick-face cases deferred on surface.offset_surface pass since PR #62 wired SmOffsetSurface::EvaluateSimple); mass.integrator wired in PR #119: 29 previously deferred cases pass and 4 now reach offset evaluation, max_rel_err 0; --perturb SENSITIVE. Runner imports the shim's exported graph into topology::Brep (as topology.vertexuse) with each face's m_pFU / m_vUVDomain / m_bRectangularTrim / m_sZoneTol3d / surface owner, SmPlanes as planes and vertex/face gap UVs; ops on faces or edges whose surface (revolution/extrusion/cone/sphere/torus subclasses) or edge curve (ellipse) the export cannot carry exactly report inexact_geometry on both sides. GetPointsInFace with more than one point compares only the draw-invariant count, U values and V grid slots (upstream srand(time)). Never compared (always deferred): sms_ReviewStartAndStopOnSeamCrvClassifies (GetIvlBound_EdgeuseObj), CalculateAnInternalPoint past its early returns (sm_FaceClassifyUVLine), CreateCurvesByTrimming of non-degenerate curves (SmCurveClassification), CreateCurvesFromFace edge loops (NormalizedEvaluate), sm_AreConnected (ComputeUVPoint stubs). Face record gains faceuse, uv_domain, rectangular_trim, tolerance (Face::new = SmFace()). Wired UNPORTED(topology.face_p2) GetUVDomain/GetTolerance in topology::vertexuse (its shim/runner now export/import the face members and SmPlanes). Remaining UNPORTED(topology.face_p2) sites (geom::object, geom::solution_array, geom::tol, intersect::point_class, intersect::curve_class::p1, intersect::topology_solver::p1, surface::plane::p2, surface::surface::p1/p7, surface::surface_cache::p1) hold opaque face handles without a Brep (plan/findings.md). Plan notes: 32 fns; largest: sm_FixUVTrimCurves, SmFace::GetPointsInFace, SmODEIsoCurveLengthIFEO::Evaluate, SmFace::CreateCurvesByTrimming; cycle back-edges (call into later units; stub or co-port): topology.edge(9), topology.vertexuse(5), topology.vertex(4), topology.loopuse(3), mass.integrator(2), query.face_p2(2), topology.edgeuse_p3(2), heal.gap(1), query.face_p3(1), topology.face_p1(1); unit-SCC #22 (220 units); hazards: clock,rng; 319 upstream test entry points reach this unit; CO-PORTED in topology.edgeuse_p1 (PR #55): SmFace::m_pSurface -> topology::Face::surface; CO-PORTED in topology.edgeuse_p2 (PR #87): SmFace::m_vUVDomain, GetUVDomain, m_sZoneTol3d, GetTolerance -> topology::Face::uv_domain, topology::Face::tolerance [topology.edgeuse_p3 wired (PR #117): 2692 cases, 2346 pass, 0 failed, 346 deferred (topology.face_p2 93, curve.crv_on_surf 74, topology.face_p3 63, query.face_p3 47, intersect.surface_drop_lib_p3 39, intersect.curve_class_p4 30); the 156 topology.edgeuse_p3 deferrals run: 24 pass, 93 defer further on topology.face_p2 and 39 on SmSurface::DropCurve]; CO-PORTED in intersect.curve_class_p4 (PR #137): FaceClassifyObjects implements ClassGeometry::topology_entity / topology_handle; ClassHandle gained Loop, Edge, Faceuse, Edgeuse, Vertexuse handles (CurveOnClassifyObjects::loop_id resolves Loop); review_start_and_stop_on_seam_crv_classifies(geometry, ...) takes a ClassGeometry for ivl_bound_edgeuse_obj; classify_curve_on_face lost its unused cross-hatch flag. [topology.face_p3 wired (PR #139, CreateUVTrimCurves): 2692 cases, 2346 pass, 0 failed, 346 deferred (topology.face_p2 93, curve.crv_on_surf 74, topology.face_p4 63, query.face_p3 47, intersect.surface_drop_lib_p3 39, intersect.curve_class_p4 30); the 63 topology.face_p3 deferrals now defer inside CreateUVTrimCurves at SmFace::GetUpwardLoopuses] [generated cases draw a B-rep with the face or edgeuse the op selects (PR #340, #294 row 6): 2692 cases, 2303 pass (1950 comparing values, no no_face left), 0 failed, 389 deferred (topology.face_p2 120, curve.crv_on_surf 84, intersect.surface_drop_lib_p3 74, topology.face_p4 63, intersect.curve_class_p2 45, query.face_p2 3)] Owner zone-tol cache (surface/owner-zone-tol): 2692 cases, 2405 pass, 0 fail, 287 deferred. UPDATE (IsInnerShell on the B-rep itself): GetPointsInFace takes the B-rep mutably; its UV-domain and iso-line classifications keep their UV trims, tolerance growth and gap caches on it.

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,692
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.crv_on_surf green 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.point_class green nurbs.b_spline_curve_p1 green surface.offset_surface green surface.surface_p2 partial surface.surface_p7 green topology.edgeuse_p1 green topology.topology green

Soft dependencies: curve.curve_p4 green curve.curve_p6 green geom.context green intersect.curve_class_p4 green nurbs.b_spline_curve_n_lib green nurbs.b_spline_curve_p2 green surface.surface_p1 green surface.surface_p5 green

Dependents: blend.feature_executive blocked blend.fillet_executive_p1 green blend.hcr green blend.identify_fillet green boolean.merge_p1 green boolean.merge_p2 green boolean.merge_p4 green boolean.topology_intersector_p1 green boolean.topology_intersector_p2 green boolean.topology_intersector_p3 green heal.face_props green heal.heal_data_p3 green heal.stitch_p1 green mass.integrator partial offset.offset_executive_p1 partial offset.offset_executive_p2 partial primitive.primitive_creation_p1 green primitive.primitive_creation_p3 green query.face_p1 green query.face_p2 green query.face_p3 green query.face_p4 green topology.brep_p1 green topology.brep_p2 green topology.brep_p3 partial topology.brep_p4 green topology.brep_p5 green topology.brep_p7 green topology.brep_p9 green topology.brep_planar_section partial topology.brep_validation green topology.edge green topology.edgeuse_p2 green topology.face_p1 green topology.face_p3 green topology.face_p4 green topology.loopuse green topology.proto_topology_p2 green topology.topology_traverser green topology.trimming_tools green topology.vertexuse green

Soft dependents: blend.fillet_corner_p1 green blend.fillet_corner_p2 partial blend.fillet_corner_p3 partial blend.fillet_custom_solver green blend.fillet_geom_p1 green blend.fillet_geom_p2 green blend.fillet_geom_p4 partial blend.fillet_geom_p5 green blend.fillet_geom_p6 green blend.fillet_solver_p1 green blend.fillet_solver_p2 green blend.fillet_solver_p3 green blend.fillet_solver_p5 green blend.fillet_standard_solver_p1 green blend.fillet_standard_solver_p2 green boolean.merge_p5 green heal.gap green heal.heal_data_p1 green offset.offset_geometry_creation partial primitive.primitive_creation_p2 green query.api_queries green query.brep green query.edge green query.loop green query.poly green query.tess green sweep.rotational_sweep_geometry green sweep.topology_sweep green sweep.trans_sweep_geometry green topology.brep_cache green topology.brep_p10 green topology.brep_p8 green topology.edgeuse_p3 green topology.vertex green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmFace::GetSurfaceSmFace.h:6481[surface], [uv_domain], [rectangular_trim], [tolerance]
SmFace::GetUVDomainSmFace.h:6491[surface], [uv_domain], [rectangular_trim], [tolerance]
SmFace::GetRectangularTrimSmFace.h:6501[surface], [uv_domain], [rectangular_trim], [tolerance]
SmFace::GetOuterLoopsSmFace.h:6771[loops], [outer_loops]
SmFace::SetUVDomainSmFace.h:6981[set_uv_domain], [set_faceuse]
SmFace::SetFaceuseSmFace.h:7071[set_uv_domain], [set_faceuse]
SmFace::GetToleranceSmFace.h:7911[surface], [uv_domain], [rectangular_trim], [tolerance]
SmFace::GetClassStringSmFace.h:9971[TYPE], [TYPE_STRING], [CLASS_STRING], [class_type], [is_kind_of]
SmFace::GetClassTypeSmFace.h:9971[TYPE], [TYPE_STRING], [CLASS_STRING], [class_type], [is_kind_of]
SmFace::GetTypeSmFace.h:9971[TYPE], [TYPE_STRING], [CLASS_STRING], [class_type], [is_kind_of]
SmFace::GetTypeStringSmFace.h:9971[TYPE], [TYPE_STRING], [CLASS_STRING], [class_type], [is_kind_of]
sm_CheckSeamCrossingSmFace.cpp:13297[check_seam_crossing]
SmFace::CalculateAnInternalPointSmFace.cpp:117185[calculate_an_internal_point]
sm_AreConnectedSmFace.cpp:1512112[are_connected], [Connection]
SmLoopOrientationSampler::SmLoopOrientationSamplerSmFace.cpp:165317
SmLoopOrientationSampler::SampleSmFace.cpp:168040
sms_ReviewStartAndStopOnSeamCrvClassifiesSmFace.cpp:332276[review_start_and_stop_on_seam_crv_classifies], [SeamCrvReview]
SmPrecisePropertyLayout::SmPrecisePropertyLayoutSmFace.cpp:574012[PrecisePropertyLayout]
SmPrecisePropertyLayout::AddSmFace.cpp:57547[PrecisePropertyLayout]
SmODEIsoCurveLengthIFEO::SmODEIsoCurveLengthIFEOSmFace.cpp:58127[OdeIsoCurveLength]
SmODEIsoCurveLengthIFEO::EvaluateSmFace.cpp:5830206[OdeIsoCurveLength]
SmODEAreaIFEO::EvaluateSmFace.cpp:604250[OdeArea]
SmFace::CreateCurvesByTrimmingSmFace.cpp:6950184[create_curves_by_trimming], [TrimmedCurves]
SmFace::CreateCurvesFromFaceSmFace.cpp:7149157[create_curves_from_face], [FaceCurves]
sm_FixUVTrimCurvesSmFace.cpp:7592308[fix_uv_trim_curves], [fix_uv_trim_curves_notified]
sm_FindBestUVCurveSmFace.cpp:7910152[find_best_uv_curve]
SmRescueSurfaceOwner::SmRescueSurfaceOwnerSmFace.cpp:80743[RescueSurfaceOwner]
SmRescueSurfaceOwner::~SmRescueSurfaceOwnerSmFace.cpp:80774
SmFace::GetFaceusesSmFace.cpp:1028317[faceuses], [upward_faceuse]
SmFace::GetLoopsSmFace.cpp:1033131[loops], [outer_loops]
SmFace::GetUpwardFaceuseSmFace.cpp:1056219[faceuses], [upward_faceuse]
sm_RemoveSuspectSplitAtSeamUVTrimCurvesSmFace.cpp:1793662[remove_suspect_split_at_seam_uv_trim_curves]
SmFace::GetPointsInFaceSmFace.cpp:21455223[points_in_face], [PointsInFace]
SmFace::IsKindOfSmFace.cpp:216834[TYPE], [TYPE_STRING], [CLASS_STRING], [class_type], [is_kind_of]
Module file-header table (26 rows)
RustUpstream
[TYPE], [TYPE_STRING], [CLASS_STRING], [class_type], [is_kind_of]SmFace::GetType, GetTypeString, GetClassString, GetClassType, IsKindOf
[surface], [uv_domain], [rectangular_trim], [tolerance]SmFace::GetSurface, GetUVDomain, GetRectangularTrim, GetTolerance (SM_USE_OLDTOL)
[set_uv_domain], [set_faceuse]SmFace::SetUVDomain, SetFaceuse
[faceuses], [upward_faceuse]SmFace::GetFaceuses, GetUpwardFaceuse
[outer_faceuse]sm_OuterFaceuse (static in the fork's SmOffsetFaces.cpp)
[loops], [outer_loops]SmFace::GetLoops, GetOuterLoops
[check_seam_crossing]sm_CheckSeamCrossing (static)
[calculate_an_internal_point]SmFace::CalculateAnInternalPoint
[are_connected], [Connection]sm_AreConnected (static)
[review_start_and_stop_on_seam_crv_classifies], [SeamCrvReview]sms_ReviewStartAndStopOnSeamCrvClassifies
[PrecisePropertyLayout]SmPrecisePropertyLayout (constructor, Add)
[OdeIsoCurveLength]SmODEIsoCurveLengthIFEO (constructor, Evaluate)
[OdeArea]SmODEAreaIFEO::Evaluate
[surface_knots_inside]sm_SurfaceKnotsInside (static; the SolidCraft fork's tangency-labs/smlib@08d9a14)
[trim_curve_breaks]sm_TrimCurveBreaks (static; the SolidCraft fork's tangency-labs/smlib@08d9a14)
[create_curves_by_trimming], [TrimmedCurves]SmFace::CreateCurvesByTrimming
[create_curves_from_face], [FaceCurves]SmFace::CreateCurvesFromFace
[fix_uv_trim_curves], [fix_uv_trim_curves_notified]sm_FixUVTrimCurves
notified_end_point_edit (private)SmBSplineCurve::EditEndPoint's SM_NO_PRE_EDIT / SM_NO_POST_EDIT
[find_best_uv_curve]sm_FindBestUVCurve (static)
[RescueSurfaceOwner]SmRescueSurfaceOwner (constructor, destructor)
[remove_suspect_split_at_seam_uv_trim_curves]sm_RemoveSuspectSplitAtSeamUVTrimCurves
[points_in_face], [PointsInFace]SmFace::GetPointsInFace
vertex_edges (private)SmVertex::GetEdges without face filter (topology::vertex::edges)
edge_edgeuses (private)SmEdge::GetEdgeuses without filters (CO-PORTED, topology.edge)
loopuse_vertexuses (private)SmLoopuse::GetVertexuses without filter (unit topology.loopuse)

Upstream tests reaching this unit

prog_test:my_test_extent3d, prog_test:my_test_vector2d, 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