solidcore

Units / heal

heal.gap partial

Layer
42
Upstream lines
1,475
Functions
119
Rust module
heal::gap

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

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

Notes

PARTIAL: difftest 445 cases (45 fixture in fixtures/heal.gap/upstream.json: prog_test my_test_drop_point circle/ellipse, my_test_reversed_line_join SmLines, my_test_topology network, TestSmCreateRectangle plane face, box_with_large_fillet.smb, sm_AddUniqueGetOrderedIndex / SetCanonical / SmGapArray edge cases, the WR-88/89/90 triggers; 400 generated: gap functions over SmBSplineCurve/SmHermiteCurve/SmLine/SmEllipse/SmCircle/SmCrvOnSurf and SmBSplineSurface/SmPlane/SmCurveBoundedSurface at 1e-3..1e3 scale with sub/degenerate/outer intervals, tolerance 0/negative/SM_USE_DEFAULT, stop-at-big-gap, SetSampleCnt/SetXSectTol3d; single Evaluate with guesses; the six gap records on .smb/wire/face/network B-reps), 380 pass, 65 deferred (surface.surface_point_solve_p3 35; SmSurface::DropPoint of the crv/srf and srf/srf functions is wired to surface.surface_p5; intersect.curve_class_p4 16: drops onto SmCrvOnSurf; topology.edgeuse_p3 14: GetOrCreateUVTrimCurve creating a missing trim curve), max_rel_err 0; --perturb SENSITIVE. Topology cases reuse the topology.vertexuse B-rep build/export (copied into the shim) and importer; the shim gives the C++ B-rep plain B-spline copies of analytic face surfaces and edge curves (what the import rebuilds; plan/findings.md). Back-edges wired: SmVertexEdgeGap/SmVertexFaceGap::Set (topology.vertexuse), SmEdgeEdgeGap::SetEdgeEdgeGap and SmCrvSrfGapFunction (topology.edgeuse_p1; calc_max_edge_face_gap/max_edge_face_gap now take the Kernel). Upstream issues WR-88, WR-89, WR-90, UB-104. Plan notes: 119 fns; largest: SmGapFunction::BuildSampleSet, SmCrvSrfGapFunction::Evaluate, SmCrvCrvGapFunction::Evaluate, SmSrfCrvGapFunction::Evaluate; unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; CO-PORTED in topology.edgeuse_p1 (PR #55): SmEdgeFaceGap, SmEdgeEdgeGap, SmVertexFaceGap data members, ReSet, IsInit, SmEdgeFaceGap::SetEdgeuse -> heal::gap::{EdgeFaceGap, EdgeEdgeGap, VertexFaceGap}; CO-PORTED in topology.vertexuse (PR #88): SmVertexEdgeGap members, ReSet, IsInit -> heal::gap::VertexEdgeGap; CO-PORTED in topology.edge (PR #103): SmGap::operator< / operator> (m_dGap3d comparisons) -> inline in topology::edge::{max_gap_3d, max_up_dim_gap_3d, max_down_dim_gap_3d} via EdgeGap::length Review PR #106 recertification after merged #50: 445 cases, 415 pass, 30 deferred, 0 failed, max_rel_err=0.0; deferred: intersect.curve_class_p4 16, topology.edgeuse_p3 14. Re-run after merging PR #106 (surface.surface_point_solve_p3 wired, 2026-10-15): 445 cases, 415 pass, 30 deferred (intersect.curve_class_p4 16, topology.edgeuse_p3 14), 0 failed, max_rel_err 0.

Difftest

Cases
445
Passed
415
Deferred
30
Failed
0
Both errored
0
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
intersect.curve_class_p4 claimed16
topology.edgeuse_p3 claimed14

Report JSON (per-case results)

Dependencies

Depends on: curve.curve_p2 green geom.extent1d green geom.tol green geom.vector2d green geom.vector3d green surface.surface_p2 partial topology.edgeuse_p1 partial topology.vertexuse partial

Soft dependencies: curve.curve_p6 green geom.extent2d green intersect.curve_class_p4 claimed nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_p1 green surface.surface_p5 green topology.edge partial topology.edgeuse_p3 claimed topology.face_p2 partial topology.vertex partial

Dependents: none

Soft dependents: heal.heal_data_p2 partial

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmGap::operator=SmGap.h:2038[Gap::assign]
SmGap::operator>SmGap.h:2121[Gap::length], [Gap::is_greater], [Gap::is_less]
SmGap::operator<SmGap.h:2131[Gap::length], [Gap::is_greater], [Gap::is_less]
SmGap::GetLengthSmGap.h:2231[Gap::length], [Gap::is_greater], [Gap::is_less]
SmGap::CacheGapSmGap.h:2334[Gap::cache_gap], [Gap::gap_end_points], [Gap::end_points], [GapEndPoints]
SmGap::GetVertexSmGap.h:2381[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmGap::GetEdgeSmGap.h:2401[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmGap::GetEdgeuseSmGap.h:2411[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmGap::GetFaceSmGap.h:2421[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmGap::GetEdgeTSmGap.h:2611[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmGap::GetUVTrimCurveTSmGap.h:2621[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmGap::GetFaceUVSmGap.h:2631[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmGap::IsKindOfSmGap.h:2981[Gap::type_code], [Gap::is_kind_of], [types]
SmVertexEdgeGap::IsInitSmGap.h:3281[VertexEdgeGap]
SmVertexEdgeGap::ReSetSmGap.h:3294[VertexEdgeGap]
SmVertexEdgeGap::operator=SmGap.h:3331[Gap::assign]
SmVertexEdgeGap::operator=SmGap.h:3347[Gap::assign]
SmVertexEdgeGap::GetEdgeTSmGap.h:3681[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmVertexEdgeGap::SetSmGap.h:3718[VertexEdgeGap]
SmVertexFaceTrimCurveGap::operator=SmGap.h:4147[Gap::assign]
SmVertexFaceTrimCurveGap::GetUVTrimCurveTSmGap.h:4461[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmVertexFaceGap::IsInitSmGap.h:4841[VertexEdgeGap]
SmVertexFaceGap::ReSetSmGap.h:4854[VertexEdgeGap]
SmVertexFaceGap::operator=SmGap.h:4907[Gap::assign]
SmVertexFaceGap::GetFaceUVSmGap.h:5241[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmVertexFaceGap::SetSmGap.h:52713[VertexEdgeGap]
SmEdgeEdgeGap::IsInitSmGap.h:5711[VertexEdgeGap]
SmEdgeEdgeGap::ReSetSmGap.h:5726[VertexEdgeGap]
SmEdgeEdgeGap::operator=SmGap.h:5799[Gap::assign]
SmEdgeEdgeGap::GetEdgeTSmGap.h:6151[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmEdgeEdgeGap::SetEdgeEdgeGapSmGap.h:62013[EdgeEdgeGap]
SmEdgeFaceTrimCurveGap::operator=SmGap.h:6698[Gap::assign]
SmEdgeFaceTrimCurveGap::GetEdgeTSmGap.h:7061[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmEdgeFaceTrimCurveGap::GetUVTrimCurveTSmGap.h:7071[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmEdgeFaceGap::SmEdgeFaceGapSmGap.h:7473[EdgeFaceGap]
SmEdgeFaceGap::IsInitSmGap.h:7511[VertexEdgeGap]
SmEdgeFaceGap::ReSetSmGap.h:7525[VertexEdgeGap]
SmEdgeFaceGap::operator=SmGap.h:7571[Gap::assign]
SmEdgeFaceGap::operator=SmGap.h:7588[Gap::assign]
SmEdgeFaceGap::~SmEdgeFaceGapSmGap.h:7791
SmEdgeFaceGap::GetEdgeTSmGap.h:7951[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmEdgeFaceGap::GetFaceUVSmGap.h:7961[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmEdgeFaceGap::SetEdgeuseSmGap.h:7981[EdgeFaceGap]
SmEdgeFaceGap::SetSmGap.h:79916[VertexEdgeGap]
SmGapArray::SmGapArraySmGap.h:8451[GapArray]
SmGapArray::operator[]SmGap.h:8471[GapArray]
SmGapArray::~SmGapArraySmGap.h:8551
SmGapArray::ReSetSmGap.h:8583[VertexEdgeGap]
SmGapArray::GetSizeSmGap.h:8721[GapArray]
SmGapArray::AddSmGap.h:8756[GapArray]
SmGapArray::AppendSmGap.h:8823[GapArray]
SmGapSample::GetThisParamSmGap.h:10131[GapSample], [GapDropType]
SmGapSample::GetOtherParamSmGap.h:10141[GapSample], [GapDropType]
SmGapSample::GetLengthSmGap.h:10171[Gap::length], [Gap::is_greater], [Gap::is_less]
SmGapSample::GetGapDropTypeSmGap.h:10191[GapSample], [GapDropType]
SmGapSample::SetCanonicalSmGap.h:102219[GapSample], [GapDropType]
SmGapFunction::~SmGapFunctionSmGap.h:12244
SmGapFunction::GetTolSmGap.h:12311[GapFunction], [GapSampleType], [GapGeometry]
SmGapFunction::GetXSectTol3dSmGap.h:12351[GapFunction], [GapSampleType], [GapGeometry]
SmGapFunction::GetMaxGapSampleSmGap.h:12514[GapFunction], [GapSampleType], [GapGeometry]
SmGapFunction::GetMaxIndexSampleSmGap.h:12593[GapFunction], [GapSampleType], [GapGeometry]
SmGapFunction::GetThisCurveSmGap.h:12681
SmGapFunction::GetThisSurfaceSmGap.h:12741
SmGapFunction::GetOtherSurfaceSmGap.h:12751
SmGapFunction::GetOtherPointSmGap.h:12771
SmGapFunction::EvaluateSmGap.h:12968[GapFunction::evaluate]
SmCrvPtGapFunction::~SmCrvPtGapFunctionSmGap.h:13911
SmCrvPtGapFunction::GetThisCurveSmGap.h:13961
SmCrvPtGapFunction::GetOtherPointSmGap.h:13971
SmCrvCrvGapFunction::~SmCrvCrvGapFunctionSmGap.h:14851
SmCrvCrvGapFunction::GetThisCurveSmGap.h:14901
SmCrvSrfGapFunction::SmCrvSrfGapFunctionSmGap.h:153919[GapFunction::crv_pt] ... [GapFunction::srf_srf]
SmCrvSrfGapFunction::~SmCrvSrfGapFunctionSmGap.h:15851
SmCrvSrfGapFunction::GetThisCurveSmGap.h:15901
SmCrvSrfGapFunction::GetOtherSurfaceSmGap.h:15911
SmSrfPtGapFunction::~SmSrfPtGapFunctionSmGap.h:16811
SmSrfPtGapFunction::GetThisSurfaceSmGap.h:16861
SmSrfPtGapFunction::GetOtherPointSmGap.h:16871
SmSrfCrvGapFunction::~SmSrfCrvGapFunctionSmGap.h:17621
SmSrfCrvGapFunction::GetThisSurfaceSmGap.h:17671
SmSrfSrfGapFunction::~SmSrfSrfGapFunctionSmGap.h:18481
SmSrfSrfGapFunction::GetThisSurfaceSmGap.h:18531
SmSrfSrfGapFunction::GetOtherSurfaceSmGap.h:18541
SmGap::GetGapEndPointsSmGap.cpp:13472[Gap::cache_gap], [Gap::gap_end_points], [Gap::end_points], [GapEndPoints]
SmVertexEdgeGap::GetVertexSmGap.cpp:6591[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexEdgeGap::GetEdgeSmGap.cpp:6611[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexEdgeGap::GetEdgeuseSmGap.cpp:6621[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexEdgeGap::IsKindOfSmGap.cpp:6631[Gap::type_code], [Gap::is_kind_of], [types]
SmVertexFaceTrimCurveGap::GetVertexSmGap.cpp:6651[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexFaceTrimCurveGap::GetEdgeuseSmGap.cpp:6671[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexFaceTrimCurveGap::GetFaceSmGap.cpp:6681[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexFaceTrimCurveGap::IsKindOfSmGap.cpp:6691[Gap::type_code], [Gap::is_kind_of], [types]
SmVertexFaceGap::GetVertexSmGap.cpp:6711[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexFaceGap::GetFaceSmGap.cpp:6731[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmVertexFaceGap::IsKindOfSmGap.cpp:6741[Gap::type_code], [Gap::is_kind_of], [types]
SmEdgeEdgeGap::GetEdgeSmGap.cpp:6764[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeEdgeGap::GetEdgeuseSmGap.cpp:6804[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeEdgeGap::IsKindOfSmGap.cpp:6841[Gap::type_code], [Gap::is_kind_of], [types]
SmEdgeFaceTrimCurveGap::GetEdgeSmGap.cpp:6871[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeFaceTrimCurveGap::GetEdgeuseSmGap.cpp:6881[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeFaceTrimCurveGap::GetFaceSmGap.cpp:6891[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeFaceTrimCurveGap::IsKindOfSmGap.cpp:6911[Gap::type_code], [Gap::is_kind_of], [types]
SmEdgeFaceGap::GetEdgeSmGap.cpp:6931[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeFaceGap::GetEdgeuseSmGap.cpp:6941[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeFaceGap::GetFaceSmGap.cpp:6951[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]
SmEdgeFaceGap::IsKindOfSmGap.cpp:6971[Gap::type_code], [Gap::is_kind_of], [types]
SmVertexFaceTrimCurveGap::GetFaceUVSmGap.cpp:70010[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmEdgeFaceTrimCurveGap::GetFaceUVSmGap.cpp:7109[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]
SmGapSample::SetTolPointSmGap.cpp:94333[GapSample], [GapDropType]
SmGapFunction::SmGapFunctionSmGap.cpp:135125[GapFunction], [GapSampleType], [GapGeometry]
SmGapFunction::SetSampleCntSmGap.cpp:150127[GapFunction], [GapSampleType], [GapGeometry]
sm_AddUniqueGetOrderedIndexSmGap.cpp:153762[add_unique_get_ordered_index]
SmGapFunction::BuildSampleSetSmGap.cpp:1620454[GapFunction], [GapSampleType], [GapGeometry]
SmCrvPtGapFunction::EvaluateSmGap.cpp:347320[GapFunction::evaluate]
SmCrvCrvGapFunction::EvaluateSmGap.cpp:3665129[GapFunction::evaluate]
SmCrvSrfGapFunction::EvaluateSmGap.cpp:3951131[GapFunction::evaluate]
SmSrfPtGapFunction::EvaluateSmGap.cpp:421022[GapFunction::evaluate]
SmSrfCrvGapFunction::EvaluateSmGap.cpp:4323105[GapFunction::evaluate]
SmSrfSrfGapFunction::EvaluateSmGap.cpp:451992[GapFunction::evaluate]
Module file-header table (20 rows)
RustUpstream
[Gap]SmGap (the virtual interface over the derived classes)
[Gap::length], [Gap::is_greater], [Gap::is_less]GetLength, operator>, operator<
[Gap::assign]operator=(const SmGap&) of every class
[Gap::cache_gap], [Gap::gap_end_points], [Gap::end_points], [GapEndPoints]CacheGap, GetGapEndPoints
[Gap::vertex], [Gap::vertexuse], [Gap::edge], [Gap::edgeuse], [Gap::face]GetVertex, GetVertexuse, GetEdge, GetEdgeuse, GetFace (base and overrides)
[Gap::edge_t], [Gap::uv_trim_curve_t], [Gap::face_uv]GetEdgeT, GetUVTrimCurveT, GetFaceUV (base and overrides)
[Gap::type_code], [Gap::is_kind_of], [types]GetType, IsKindOf, the Sm*Gap_TYPE codes
[XSECT_TOL_3D]SM_XSECT_TOL_3D
[VertexEdgeGap]SmVertexEdgeGap (Set, ReSet, IsInit, GetEdgeT)
[VertexFaceTrimCurveGap]SmVertexFaceTrimCurveGap (Set, ReSet, IsInit, GetUVTrimCurveT, GetFaceUV)
[VertexFaceGap]SmVertexFaceGap (Set, ReSet, IsInit, GetFaceUV)
[EdgeEdgeGap]SmEdgeEdgeGap (SetEdgeEdgeGap, ReSet, IsInit, GetEdgeT)
[EdgeFaceTrimCurveGap]SmEdgeFaceTrimCurveGap (Set, GetEdgeT, GetUVTrimCurveT, GetFaceUV)
[EdgeFaceGap]SmEdgeFaceGap (constructor, Set, SetEdgeuse, ReSet, IsInit, GetEdgeT, GetFaceUV, destructor)
[GapArray]SmGapArray (constructor, operator[], ReSet, GetSize, Add, Append, destructor)
[GapSample], [GapDropType]SmGapSample (GetThisParam, GetOtherParam, GetLength, GetGapDropType, SetCanonical, SetTolPoint), SmGapDropType
[GapFunction], [GapSampleType], [GapGeometry]SmGapFunction (constructor, destructor, SetSampleCnt, BuildSampleSet, GetMaxGapSample, GetMaxIndexSample, GetTol, GetXSectTol3d, GetThis* / GetOther*), SmGapSampleType
[GapFunction::crv_pt] ... [GapFunction::srf_srf]the derived class constructors (SmCrvSrfGapFunction ...)
[GapFunction::evaluate]Evaluate of SmCrvPtGapFunction, SmCrvCrvGapFunction, SmCrvSrfGapFunction, SmSrfPtGapFunction, SmSrfCrvGapFunction, SmSrfSrfGapFunction
[add_unique_get_ordered_index]sm_AddUniqueGetOrderedIndex

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