solidcore

Units / heal

heal.heal_data_p2 partial

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

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

Notes

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; topology.face_p3 9: SmFace::IsDegenerate); --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

Difftest

Cases
738
Passed
347
Deferred
391
Failed
0
Both errored
0
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
topology.edgeuse_p3 claimed263
topology.face_p2 partial100
topology.brep_p1 claimed19
topology.face_p3 claimed9

Report JSON (per-case results)

Dependencies

Depends on: geom.extent1d green geom.tol green heal.face_props partial topology.edge partial topology.vertex partial

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

Dependents: heal.heal_data_p1 partial heal.heal_data_p3 partial

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:33155[HealData::load_targets], [HealData::free_targets]
SmHealData::FreeTargetsSmHealData.cpp:39630[HealData::load_targets], [HealData::free_targets]
SmHealData::SetupEmptyProbArraysSmHealData.cpp:548245[HealData::setup_empty_prob_arrays]
SmHealData::GetFaceProps_ForTgtsSmHealData.cpp:80037[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]
SmHealData::GetEdgeProps_ForTgtsSmHealData.cpp:84437[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]
SmHealData::GetVertexProps_ForTgtsSmHealData.cpp:88837[HealData::face_props_for_tgts], [HealData::edge_props_for_tgts], [HealData::vertex_props_for_tgts]
SmHealData::RemoveVertexProps_FromListsSmHealData.cpp:132035[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]
SmHealData::RemoveEdgeProps_FromListsSmHealData.cpp:136337[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]
SmHealData::RemoveFaceProps_FromListsSmHealData.cpp:140853[HealData::remove_vertex_props_from_lists], [HealData::remove_edge_props_from_lists], [HealData::remove_face_props_from_lists]
SmHealData::Cache_EdgePropsSmHealData.cpp:2434119[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]
SmHealData::Cache_VertexPropsSmHealData.cpp:2566102[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]
SmHealData::Cache_FaceProps_GapsSmHealData.cpp:2678106[HealData::cache_edge_props], [HealData::cache_vertex_props], [HealData::cache_face_props_gaps]
SmHealData::Fix_TolSizesSmHealData.cpp:2801235[HealData::fix_tol_sizes]
SmHealData::Cache_CoinVerticesSmHealData.cpp:3048212[HealData::cache_coin_vertices], [HealData::cache_degen_faces]
SmHealData::Cache_DegenFacesSmHealData.cpp:337660[HealData::cache_coin_vertices], [HealData::cache_degen_faces]
SmHealData::Cache_CoinEdgesSmHealData.cpp:379849[HealData::cache_coin_edges], [HealData::fix_coin_edges]
SmHealData::Fix_CoinEdgesSmHealData.cpp:385528[HealData::cache_coin_edges], [HealData::fix_coin_edges]
SmHealData::Cache_MissedEdgeXSectsSmHealData.cpp:389350[HealData::cache_missed_edge_xsects], [HealData::fix_missed_edge_xsects]
SmHealData::Fix_MissedEdgeXSectsSmHealData.cpp:395028[HealData::cache_missed_edge_xsects], [HealData::fix_missed_edge_xsects]
SmHealData::Fix_UncontainedEdgesSmHealData.cpp:398450[HealData::fix_uncontained_edges], [HealData::fix_bad_gaps]
SmHealData::Fix_BadGapsSmHealData.cpp:404224[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