solidcore

Units / heal

heal.heal_data_p2 green

Layer
48
Upstream lines
2,164
Functions
52
Rust module
heal::heal_data::p2

Status history

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

Source: crates/solidcore/src/heal/heal_data/p2.rs

Upstream: source/SMLib/inc/SmEdgeProps.h, source/SMLib/inc/SmHealProbArray.h, source/SMLib/inc/SmVertexProps.h, source/SMLib/src/SmEdgeProps.cpp, source/SMLib/src/SmHealData.cpp, source/SMLib/src/SmVertexProps.cpp

Port-plan notes

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

PARTIAL (PR #128): difftest 738 cases (138 fixture: 75 in fixtures/heal.heal_data_p2/upstream.json, 38 in edge_cases.json, 25 review cases in review_adv.json (edge-length histogram buckets 0/1/10, coincident-vertex removals on a live pair array, incremental re-runs, duplicate targets, 1e4/mixed/1-voxel boxes, Reset re-runs); edge_cases.json: prog_test my_test_squeeze_edge_tracks_removal / my_test_missing_poles_refreshes_all_faces boxes, my_test_closed_sphere_properties sphere faces (both UV orders), SM_API_test TestSmHealBrep 10-box sequence, 15 pt_TestFiles .smb B-reps (plain, rebuilt+reversed, edges+faces only, with cached gaps), the my_test_topology wire network, wire edges incl. a near-degenerate one, empty/duplicate targets, 1-voxel and skewed voxel models, 1e-4/1e4/flat boxes, target-list drift, coincident-vertex re-runs, removals, FreeTargets, LoadTargets, ReSet props, and SmPairProbArray odd-list/no-link cases; 600 generated: problem-array scripts over SmFaceProps and heal scripts on boxes, spheres, files, wires, faces, networks), 347 pass (max_rel_err 0, no absolute floors), 0 failed, 391 deferred (topology.edgeuse_p3 263: SmEdgeuse::NormalizedEvaluate in SmVertexuse::ComputeUVPoint of vertex/face gaps; topology.face_p2 100: SmFace::GetTolerance stubs in the surface drop of edge/face and vertex/face gaps; topology.brep_p1 19: Fix_TolSizes' SmBrep model size; intersect.curve_class_p4 9: SmCurveClassification in the wired SmFace::IsDegenerate of topology.face_p3, PR #139); --perturb 347/347 detected. Not compared yet (plan/findings.md): Fix_UncontainedEdges clamping (no fixture builds an uncontained edge), vertex BadSmallZoneTol3d/WarnLargeGap3d and face zone-tol flags (need vertex/face gaps, deferred on topology.edgeuse_p3). Gate shape: per step status and results, then the whole healer state (targets, every props record, every problem array with labels, histograms, statistics, voxel point items). The C++ side replaces analytic geometry by plain B-splines (as heal.gap); the Rust side imports the topology.vertexuse export and restores each vertex's vertex-use order and the cached edge-use/vertex-use gap records from the shim. CO-PORTED in heal.heal_data_p2 (PR #128): SmHealData record, SmHealData() and SmHealData(pBrep, lists) (the state of ReSet(TRUE) on a new object) -> heal::heal_data::p2::{HealData, HealData::new, HealData::with_targets}; SmObjProps (no owning unit) -> heal::heal_data::p2::ObjProps. Added Default for geom::hash_table::ObjsInVoxels (an unsized model). No UNPORTED(heal.heal_data_p2) stubs existed. UNPORTED stubs: topology.brep_p1 (SmBrep::GetThisModelSizeEstimate, SetThisModelSizeEstimate, GetTolerance), topology.brep_p2 (SmBrep::SetTolerance), topology.face_p3 (SmFace::SetTolerance, IsDegenerate). Builds on heal.face_props PR #122 (unmerged; branch includes its head 845627d3): merge #122 first or together so the CO-PORTED types are not duplicated. 52 fns; largest: SmHealData::SetupEmptyProbArrays, SmHealData::Fix_TolSizes, SmHealData::Cache_CoinVertices, SmEdgeProps::SetProps; unit-SCC #22 (220 units); 59 upstream test entry points reach this unit UPDATE after topology.brep_p1 (PR #145): SmBrep::GetTolerance, GetThisModelSizeEstimate and SetThisModelSizeEstimate wired (fix_tol_sizes takes &mut Kernel; the remaining SmBrep stub is SetTolerance, topology.brep_p2). Re-run 738 cases, 347 pass, 0 fail, 391 deferred (topology.edgeuse_p3 263, topology.face_p2 100, topology.brep_p2 19, topology.face_p3 9). [topology.face_p3 wired (PR #139, SetTolerance, IsDegenerate): the 13 topology.face_p3 deferrals now defer inside IsDegenerate at the SmCurveClassification constructor (intersect.curve_class_p4); counts: see reports/difftest/heal.heal_data_p2.json] UPDATE after topology.brep_p2 (PR #149) wired SmBrep::SetTolerance (set_brep_tolerance -> topology::brep::p2::set_tolerance with upstream's default arguments): 738 cases, 364 pass, 0 fail, 374 deferred (topology.edgeuse_p3 263, topology.face_p2 100, topology.face_p3 11), max_rel_err 0. Re-run after merging #145 5b1b28ae into #149: 738 cases, 469 pass, 0 fail, 269 deferred (topology.face_p2 252, topology.face_p3 17; the 13 former SmBrep::SetTolerance deferrals: 11 pass, 2 defer on SmFace::IsDegenerate), --perturb SENSITIVE 469/469; the Fix_BadSheets step passes a harness RegionNotifyState. Re-run in PR #149 (review 5578349117 round, merged with main through fb58ea76; topology.brep_p2's UNPORTED stubs wired): 738 cases, 469 pass, 0 fail, 269 deferred (topology.face_p2 252, intersect.curve_class_p2 17); 28 SmBrep::SetTolerance deferrals pass, the rest relabel. Owner zone-tol cache (surface/owner-zone-tol): 738 cases, 701 pass, 0 fail, 37 deferred. GREEN (2026-10-23, PR #600): difftest PASS heal.heal_data_p2 cases=738 passed=738 failed=0 deferred=0 max_rel_err=0e0 with_values=738 no_values=0 vacuous=0; the former 37 heal.heal_data_p2 deferrals (owner zone-tol cache count) no longer occur on main 38b0745b3; local rerun and CI run 39935703236 agree. UPDATE (own-reader input, 2026-10-28): the heal cases of heal.heal_data_p1/p2/p3 build their Rust B-rep with the Rust kernel (own_brep: Rust .smb reader, Rust constructors, the single-vertex sphere record by record as SmBrepConstructor), renumbered into the shim walk; the shim no longer replaces geometry with plain B-splines (it replaced none in the corpus) and the vertex-list/cached-gap channel is removed. 741 cases, 741 pass, per-case C++ and Rust output digests unchanged (plan/findings/heal.heal_data_p2--own-reader-kept-on-import--addendum-2026-10-28-heal-switched.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
741
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.extent1d green geom.tol green heal.face_props green topology.edge green topology.vertex green

Soft dependencies: curve.curve_p2 green curve.curve_p4 green geom.extent3d green geom.hash_table green geom.object green geom.vector3d green heal.gap green topology.brep_p2 green topology.edgeuse_p1 green topology.face_p3 green topology.topology green topology.vertexuse green

Dependents: heal.heal_data_p1 green heal.heal_data_p3 green

Soft dependents: none

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmEdgeProps::~SmEdgePropsSmEdgeProps.h:861[EdgeProps], [EdgeProps::new], [EdgeProps::for_edge]
SmEdgeProps::SetContextSmEdgeProps.h:961[EdgeProps], [EdgeProps::new], [EdgeProps::for_edge]
SmProbArray::ReSetSmHealProbArray.h:3051[EdgeProps::reset]
SmProbArray::SetupSmHealProbArray.h:3088[ProbArray]
SmProbArray::IncOrigProbCountSmHealProbArray.h:3191[ProbArray]
SmProbArray::RemoveSmHealProbArray.h:3201[ProbArray]
SmProbArray::RemoveAllSmHealProbArray.h:3211[ProbArray]
SmProbArray::GetSizeSmHealProbArray.h:3221[ProbArray]
SmProbArray::operator[]SmHealProbArray.h:3231[ProbArray]
SmProbArray::GetAtSmHealProbArray.h:3241[ProbArray]
SmProbArray::AddSmHealProbArray.h:3269[ProbArray]
SmProbArray::SetLabelsSmHealProbArray.h:34911[ProbArray]
SmPairProbArray::ReSetSmHealProbArray.h:5333[EdgeProps::reset]
SmPairProbArray::RemoveSmHealProbArray.h:54631[ProbArray]
SmMixedProbArray::ReSetSmHealProbArray.h:7123[EdgeProps::reset]
SmMixedProbArray::SetupSmHealProbArray.h:7178[ProbArray]
SmMixedProbArray::AddSmHealProbArray.h:72715[ProbArray]
SmTriedProbArray::SetupSmHealProbArray.h:8776[ProbArray]
SmTriedProbArray::AddSmHealProbArray.h:89012[ProbArray]
SmVertexProps::~SmVertexPropsSmVertexProps.h:631[VertexProps], [VertexProps::new], [VertexProps::for_vertex]
SmVertexProps::SetContextSmVertexProps.h:751[EdgeProps], [EdgeProps::new], [EdgeProps::for_edge]
SmEdgeProps::SmEdgePropsSmEdgeProps.cpp:416[EdgeProps], [EdgeProps::new], [EdgeProps::for_edge]
SmEdgeProps::ReSetSmEdgeProps.cpp:18137[EdgeProps::reset]
SmEdgeProps::IsSet_MetadataSmEdgeProps.cpp:22422[EdgeProps::is_set_metadata], [EdgeProps::is_set_gaps], [EdgeProps::is_set], [EdgeProps::has_problems]
SmEdgeProps::IsSet_GapsSmEdgeProps.cpp:25215[EdgeProps::is_set_metadata], [EdgeProps::is_set_gaps], [EdgeProps::is_set], [EdgeProps::has_problems]
SmEdgeProps::SetPropsSmEdgeProps.cpp:305139[EdgeProps::set_props], [EdgeProps::set_props_metadata]
SmEdgeProps::SetProps_MetadataSmEdgeProps.cpp:45041[EdgeProps::set_props], [EdgeProps::set_props_metadata]
SmHealData::LoadTargetsSmHealData.cpp:33255[HealData::load_targets], [HealData::free_targets]
SmHealData::FreeTargetsSmHealData.cpp:39730[HealData::load_targets], [HealData::free_targets]
SmHealData::SetupEmptyProbArraysSmHealData.cpp:549248[HealData::setup_empty_prob_arrays]
SmHealData::GetFaceProps_ForTgtsSmHealData.cpp:80437[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]
SmHealData::GetEdgeProps_ForTgtsSmHealData.cpp:84837[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]
SmHealData::GetVertexProps_ForTgtsSmHealData.cpp:89237[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]
SmHealData::RemoveVertexProps_FromListsSmHealData.cpp:132735[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]
SmHealData::RemoveEdgeProps_FromListsSmHealData.cpp:137037[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]
SmHealData::RemoveFaceProps_FromListsSmHealData.cpp:141554[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]
SmHealData::Cache_EdgePropsSmHealData.cpp:2451119[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]
SmHealData::Cache_VertexPropsSmHealData.cpp:2583102[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]
SmHealData::Cache_FaceProps_GapsSmHealData.cpp:2695106[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]
SmHealData::Fix_TolSizesSmHealData.cpp:2818235[HealData::fix_tol_sizes]
SmHealData::Cache_CoinVerticesSmHealData.cpp:3065212[HealData::cache_coin_vertices], [HealData::cache_degen_faces]
SmHealData::Cache_DegenFacesSmHealData.cpp:339360[HealData::cache_coin_vertices], [HealData::cache_degen_faces]
SmHealData::Cache_CoinEdgesSmHealData.cpp:369349[HealData::cache_coin_edges], [HealData::fix_coin_edges]
SmHealData::Fix_CoinEdgesSmHealData.cpp:375028[HealData::cache_coin_edges], [HealData::fix_coin_edges]
SmHealData::Cache_MissedEdgeXSectsSmHealData.cpp:378850[HealData::cache_missed_edge_xsects], [HealData::fix_missed_edge_xsects]
SmHealData::Fix_MissedEdgeXSectsSmHealData.cpp:384528[HealData::cache_missed_edge_xsects], [HealData::fix_missed_edge_xsects]
SmHealData::Fix_UncontainedEdgesSmHealData.cpp:387950[HealData::fix_uncontained_edges], [HealData::fix_bad_gaps]
SmHealData::Fix_BadGapsSmHealData.cpp:393724[HealData::fix_uncontained_edges], [HealData::fix_bad_gaps]
SmVertexProps::SmVertexPropsSmVertexProps.cpp:426[VertexProps], [VertexProps::new], [VertexProps::for_vertex]
SmVertexProps::ReSetSmVertexProps.cpp:15719[VertexProps::reset], [VertexProps::set_props], [VertexProps::is_set], [VertexProps::has_problems]
SmVertexProps::SetPropsSmVertexProps.cpp:194107[EdgeProps::set_props], [EdgeProps::set_props_metadata]
SmVertexProps::IsSetSmVertexProps.cpp:30722[EdgeProps::is_set_metadata], [EdgeProps::is_set_gaps], [EdgeProps::is_set], [EdgeProps::has_problems]
Module file-header table (25 rows)
RustUpstream
[ObjProps]SmObjProps (m_bBadBackPointer)
[EdgeProps], [EdgeProps::new], [EdgeProps::for_edge]SmEdgeProps, its constructors, ~SmEdgeProps (Drop), SetContext (no counterpart)
[EdgeProps::reset]SmEdgeProps::ReSet
[EdgeProps::is_set_metadata], [EdgeProps::is_set_gaps], [EdgeProps::is_set], [EdgeProps::has_problems]IsSet_Metadata, IsSet_Gaps, IsSet, HasProblems
[EdgeProps::set_props], [EdgeProps::set_props_metadata]SmEdgeProps::SetProps, SetProps_Metadata
[VertexProps], [VertexProps::new], [VertexProps::for_vertex]SmVertexProps, its constructors, ~SmVertexProps (Drop), SetContext (no counterpart)
[VertexProps::reset], [VertexProps::set_props], [VertexProps::is_set], [VertexProps::has_problems]SmVertexProps::ReSet, SetProps, IsSet, HasProblems
[ProbArray]SmProbArray<TYPE> (ReSet, Setup, IncOrigProbCount, Remove, RemoveAll, GetSize, operator[], GetAt, Add, SetLabels, GetOrigProbCount, SetOrigProbCnt)
[PairProbArray]SmPairProbArray<TYPE> (ReSet, Remove, SetOrigCoinPairCnt)
[MixedProbArray]SmMixedProbArray<TYPE> (ReSet, Setup, Add)
[TriedProbArray]SmTriedProbArray<TYPE> (Setup, Add)
[FlagLink], [MixedLink], [TriedLink], [EdgeFlag], [VertexFlag], [FaceFlag], [ObjFlag], [FaceMixed], [FaceTried]the pointers to members ULONG TYPE::*, SmMixedLinkType TYPE::*, SmTriedLinkType TYPE::*
[HealData]SmHealData (record CO-PORTED from heal.heal_data_p1)
[HealData::new], [HealData::with_targets]SmHealData(), SmHealData(pBrep, rVertices, rEdges, rFaces) (CO-PORTED: the state of ReSet(TRUE) on a new object)
[HealData::load_targets], [HealData::free_targets]LoadTargets, FreeTargets
[HealData::setup_empty_prob_arrays]SetupEmptyProbArrays
[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]GetFaceProps_ForTgts, GetEdgeProps_ForTgts, GetVertexProps_ForTgts
[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]RemoveVertexProps_FromLists, RemoveEdgeProps_FromLists, RemoveFaceProps_FromLists
[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]Cache_EdgeProps, Cache_VertexProps, Cache_FaceProps_Gaps
[HealData::fix_tol_sizes]Fix_TolSizes
[HealData::cache_coin_vertices], [HealData::cache_degen_faces]Cache_CoinVertices, Cache_DegenFaces
[HealData::cache_coin_edges], [HealData::fix_coin_edges]Cache_CoinEdges, Fix_CoinEdges
[HealData::cache_missed_edge_xsects], [HealData::fix_missed_edge_xsects]Cache_MissedEdgeXSects, Fix_MissedEdgeXSects
[HealData::fix_uncontained_edges], [HealData::fix_bad_gaps]Fix_UncontainedEdges, Fix_BadGaps
[edge_len_histogram_index]SM_HISTOGRAM_EDGELEN_INDEX

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