solidcore

Units / heal

heal.face_props green

Layer
46
Upstream lines
1,482
Functions
25
Rust module
heal::face_props

Status history

Oct 12Nov 25
  1. todo 1,410 lines
  2. partial 1,410 lines
  3. green 1,410 lines

Source: crates/solidcore/src/heal/face_props.rs

Upstream: source/SMLib/inc/SmFaceProps.h, source/SMLib/inc/SmLoopProps.h, source/SMLib/src/SmFaceProps.cpp, source/SMLib/src/SmLoopProps.cpp

Port-plan notes

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

2026-10-27 (Stage 3 coverage): circle loops in the one-face builder, op 9 (the loop props SetProps_Stage3 leaves), 300 s3gen cases on their own seeds and 43 fixtures (fixtures/heal.face_props/stage3_classify.json) reach SetProps_Stage3 past a successful ClassifyLoops (containment incl. nested/bot/top loops, orientations, outer/orient/no-area/nested counts, outer loop order, unpaired no-area loop); the runner uses the stateful SetProps calls (set_props_with_query_gaps, set_props_stage2_mut, new set_props_stage3_mut) so a Stage 3 re-run sees the UV trim curves the first ClassifyLoops left, as upstream. Not reached: m_lBadMissingPoles, bad closed-loop counts. GREEN heal.face_props cases=1871 passed=1871 failed=0 deferred=0 max_rel_err=0e0 with_values=1862 no_values=9 vacuous=0; --perturb 1871/1871 detected. #700 stack (opt-in Kernel::fixes.heal_stage3_failures_propagate, WR-266/WR-268, default off = SMLib): default difftest unchanged, no known mismatches; with the fix on, a failed SetProps_Stage3 propagates ClassifyLoops failures and resets its in-progress marker (the 8 stage-marker cases then differ from C++, 5 vs 4). 2026-10-25 (PR #863, snapshot surfaces keep their face owner, plan/findings.md 'snapshot surfaces keep their face owner'): gen0646, gen0790, gen1312 pass; GREEN heal.face_props cases=1528 passed=1528 failed=0 deferred=0 max_rel_err=0e0 with_values=1519 no_values=9 vacuous=0. 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: of 15 surface.surface_p2 deferrals 12 pass, 3 are known mismatches (gen0646, gen0790, gen1312: torus seam FindVertexSector). PARTIAL heal.face_props cases=1528 passed=1525 failed=0 deferred=0 max_rel_err=1e0 with_values=1516 no_values=9 vacuous=0 known_mismatch=3. PR #697 (2026-10-24, face surfaces keep their trimmed caches): 1528 cases, 1439 pass, 0 failed, 89 deferred (topology.face_p4 88, intersect.curve_class_p4 1); the 15 cache-history (tolerance growth) deferrals go: IntersectVertices' gap reads now run with the surface owner cleared, so the standalone trimmed cache upstream keeps is made there and reused (8 pass, the rest defer further on at FindVertexSector). PR #639 (2026-10-23): the runner builds the down face use side (SmBrepConstructor), which fixes the seam EDGE-vs-VERTEX snap; difftest 1528 cases, 1431 pass, 0 failed, 97 deferred (topology.face_p4 FindVertexSector 82, surface.surface_p2 trimmed surface cache history 15; was FindVertexSector 69 + EdgeCurveOnClassify 28). PARTIAL: difftest 1528 cases (28 fixture + 1500 generated: SetProps/Gaps/Stage2/Stage3 scripts, SmLoopProps::SetProps of every loop (op 8), seeded state, ReSet, HasProps, HasProblems, IsPoint3dOnPole, loop tree build + FindItem, on one-face B-reps with a plane or SmSurfOfRevolution surface (cylinder, cone with/without apex, sphere, torus; open or closed) owned by the face, a vertex loop or edge loops with holes, face tolerances up to 1e9; 9 fixture cases are FFI-guard regression cases, UB-131 and UB-128), 1314 pass bit-identical (max_rel_err 0), 0 failed, 214 deferred (topology.face_p4 210: SmFace::HasSeamProblem for closed faces in SetProps_Stage2; query.face_p4 4: SmFace::ClassifyLoops in SetProps_Stage3); --perturb 1314/1314 detected. Upstream defects UB-131 (SetProps_Gaps early return makes the Stage2/3 face re-run ineffective) and UB-128 (SetProps_Stage3 on a plane with a degenerate domain and edge loops segfaults in ClassifyLoops; the guard rejects a plane side below 1e-6 when Stage 3 can be reached); the guard rejects the crashing scripts. Snapshots compare the flat corner points too; no generated surface has a nonzero m_lBadFlatCorners (harness limitation, findings.md). Stage 3 is compared only through op 8 (direct Stage 3 cases defer at ClassifyLoops). Added Surface::get_singularities_of_face (face tolerance for the owned surface; other UNPORTED(topology.face_p2) tolerance stubs on surfaces unchanged). Wired: topology.loopuse (PR #102), SmSurface::GetSingularities (surface.surface_p3), SmFace::GetVertices (query.face_p2 co-port). Remaining UNPORTED stubs: topology.face_p4 HasSeamProblem, query.face_p4 ClassifyLoops, intersect.curve_class_p2 CurveClassification::ReSet (dead branch). No UNPORTED(heal.face_props) stubs existed on main. FaceProps<O> is generic over a LoopObject handle; the loop tree is an arena (Looptree). CO-PORTED in heal.face_props (PR #122): SmMixedLinkType, SmTriedLinkType, SmHealerOpType (SmHealProbArray.h) -> heal::face_props::{MixedLinkType, TriedLinkType, HealerOpType} (owner heal.heal_data_p2 extends); SmContainmentType (SmTypes.h) -> heal::face_props::ContainmentType. 25 fns; largest: SmFaceProps::SetProps_Stage3, SmFaceProps::SetProps_Stage2, SmLoopProps::SetProps, SmFaceProps::ReSet; unit-SCC #22 (220 units); 100 upstream test entry points reach this unit PR #137 (intersect.curve_class_p4): the shim's face builder, seed and snapshot moved verbatim into harness/cpp/shim/sc_one_face_brep.h, shared with the intersect.curve_class_p4 shim; the runner's FaceIn, rust_brep, ffi_face, snapshot, seed and gen_face are pub(crate) for that runner, the ffi gained encode_face and pub seed_ok. Re-run: 1528 cases, 1314 pass, 214 deferred (query.face_p4 4, topology.face_p4 210), 0 failed, --perturb SENSITIVE 1314/1314. Merge of query.face_p3 (PR #132): query.face_p4 and query.face_p3 wired, the 4 ClassifyLoops deferrals reach further: 1528 cases, 1317 pass, 211 deferred (topology.face_p4 210, topology.face_p2 1), 0 failed. topology.face_p4: FaceProps::set_props_stage2_with takes the SetProps_Stage2 HasSeamProblem call as a callback (face::p4::has_seam_problem passes itself); set_props_stage2 keeps the stub for callers without classification objects.

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,873
Stored error outcomes
9
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.tol green geom.vector3d green intersect.curve_class_p1 green topology.face_p2 partial topology.loopuse green

Soft dependencies: geom.extent2d green geom.object green intersect.curve_class_p2 green query.face_p4 green surface.surface_p2 partial surface.surface_p3 green surface.surface_p7 green topology.edgeuse_p1 green topology.face_p4 green topology.vertex green topology.vertexuse green

Dependents: heal.heal_data_p2 green heal.heal_data_p3 green

Soft dependents: heal.heal_data_p1 green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmFaceProps::HasPropsSmFaceProps.h:3756[FaceProps::has_props], [FaceProps::has_props_stage1], [FaceProps::has_props_stage2], [FaceProps::has_props_stage3]
SmFaceProps::HasProps_Stage1SmFaceProps.h:3817[FaceProps::has_props], [FaceProps::has_props_stage1], [FaceProps::has_props_stage2], [FaceProps::has_props_stage3]
SmFaceProps::HasProps_Stage2SmFaceProps.h:3888[FaceProps::has_props], [FaceProps::has_props_stage1], [FaceProps::has_props_stage2], [FaceProps::has_props_stage3]
SmFaceProps::HasProps_Stage3SmFaceProps.h:3969[FaceProps::has_props], [FaceProps::has_props_stage1], [FaceProps::has_props_stage2], [FaceProps::has_props_stage3]
SmLoopProps::SetContextSmLoopProps.h:1541
SmLooptreeItem::IsNoArea_PairSmLoopProps.h:2691[LooptreeItem::is_no_area_pair], [LooptreeItem::add_partner]
SmLooptreeItem::AddChildSmLoopProps.h:3165[Looptree::add_child], [Looptree::add_sibling]
SmLooptreeItem::AddSiblingSmLoopProps.h:3235[Looptree::add_child], [Looptree::add_sibling]
SmLooptreeItem::AddPartnerSmLoopProps.h:33012[LooptreeItem::is_no_area_pair], [LooptreeItem::add_partner]
SmFaceProps::SmFacePropsSmFaceProps.cpp:4313[FaceProps], [FaceProps::new], [FaceProps::for_face]
SmFaceProps::~SmFacePropsSmFaceProps.cpp:4769Drop (implicit)
SmFaceProps::SetContextSmFaceProps.cpp:4928
SmFaceProps::ReSetSmFaceProps.cpp:506142[FaceProps::reset]
SmFaceProps::SetPropsSmFaceProps.cpp:65682[FaceProps::set_props]
SmFaceProps::SetProps_GapsSmFaceProps.cpp:76763[FaceProps::set_props_gaps]
SmFaceProps::SetProps_Stage2SmFaceProps.cpp:855264[FaceProps::set_props_stage2]
SmFaceProps::SetProps_Stage3SmFaceProps.cpp:1287517[FaceProps::set_props_stage3]
SmFaceProps::IsPoint3dOnPoleSmFaceProps.cpp:181321[FaceProps::is_point3d_on_pole]
SmFaceProps::HasProblemsSmFaceProps.cpp:184256[FaceProps::has_problems]
SmLoopProps::ReSetSmLoopProps.cpp:28832[LoopProps::reset], [LoopProps::set_props]
SmLoopProps::SetPropsSmLoopProps.cpp:340149[LoopProps::reset], [LoopProps::set_props]
SmLooptreeItem::SmLooptreeItemSmLoopProps.cpp:74111[Looptree], [LooptreeItem], [ItemId]
SmLooptreeItem::ReSetNoRecursionSmLoopProps.cpp:8039[LooptreeItem::reset_no_recursion]
SmLooptreeItem::~SmLooptreeItemSmLoopProps.cpp:86610Drop (implicit)
SmLooptreeItem::FindItemSmLoopProps.cpp:91642[Looptree::find_item]
Module file-header table (22 rows)
RustUpstream
[FaceProps], [FaceProps::new], [FaceProps::for_face]SmFaceProps, SmFaceProps(), SmFaceProps(face, index)
Drop (implicit)~SmFaceProps, ~SmLooptreeItem
[FaceProps::reset]SmFaceProps::ReSet
[FaceProps::set_props]SmFaceProps::SetProps
[FaceProps::set_props_gaps]SmFaceProps::SetProps_Gaps
[FaceProps::set_props_stage2]SmFaceProps::SetProps_Stage2
[FaceProps::set_props_stage3]SmFaceProps::SetProps_Stage3
[FaceProps::is_point3d_on_pole]SmFaceProps::IsPoint3dOnPole
[FaceProps::has_problems]SmFaceProps::HasProblems
[FaceProps::has_props], [FaceProps::has_props_stage1], [FaceProps::has_props_stage2], [FaceProps::has_props_stage3]HasProps, HasProps_Stage1, HasProps_Stage2, HasProps_Stage3
[PropStage], [HealNotYetFaceType]SmPropStageType, SmHealNotYetFaceType
[MixedLinkType], [TriedLinkType], [HealerOpType]SmMixedLinkType, SmTriedLinkType, SmHealerOpType (SmHealProbArray.h; CO-PORTED here)
[ContainmentType]SmContainmentType (SmTypes.h)
[LoopProps], [LoopProps::new]SmLoopProps, its constructors
[LoopProps::reset], [LoopProps::set_props]SmLoopProps::ReSet, SmLoopProps::SetProps
[ClassifyLoopIo]SmClassifyLoopIO
[Looptree], [LooptreeItem], [ItemId]the SmLooptreeItem tree and its nodes
[LooptreeItem::new], [LooptreeItem::with_loop], [LooptreeItem::with_partner]SmLooptreeItem constructors
[LooptreeItem::reset_no_recursion]SmLooptreeItem::ReSetNoRecursion
[LooptreeItem::is_no_area_pair], [LooptreeItem::add_partner]IsNoArea_Pair, AddPartner
[Looptree::add_child], [Looptree::add_sibling]SmLooptreeItem::AddChild, AddSibling
[Looptree::find_item]SmLooptreeItem::FindItem

Upstream tests reaching this unit

prog_test:my_test_trimming_tools, SM_API_test:TestSmTrimSurfaceWith3dCurves, 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