solidcore

Units / topology

topology.trimming_tools partial

Layer
41
Upstream lines
2,878
Functions
49
Rust module
topology::trimming_tools

Source: crates/solidcore/src/topology/trimming_tools.rs

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

Notes

PARTIAL: difftest 3263 cases (2063 fixture: upstream.json re-expresses SM_API_test TestSmOrderCurves, TestSmCreatePlanarFaces, TestSmCreatePlanarCircle; edge_cases.json: empty/open/off-plane/degenerate loops, tolerance-limit gaps, 1e-6..1e6 scales, nested and side-by-side loops, zero-area loops (UB-119), iso/mirror tolerance limits, curve-loop scripts; seams.json; rv_ellipse.json: review cases, SmEllipse (inside-out, tiny radii) and SmLine UV curves in MirrorCurve / IsIsoCurve / IsIsoCurveOnSeam; breps.json: AreUVCurvesPresent, GetEdgeUVExtremes, CheckLoop, CheckFace, FixTrimLoopTinyParameterSpaceGaps, EnsureLastEdgeuseUVCorrect, FixBackwardsOuterLoopOnSeam (with a MirrorCurve pre-step making seam jumps), FixTrimLoopOrientation/Order on the 15 topology.vertexuse .smb files; 1200 generated over real SmBSplineCurve/SmLine/SmEllipse/circle arcs and SmBSplineSurface (open, closed in u or v, pinched, C0, rational)/SmPlane/SmCurveBoundedSurface), 2842 pass bit-identical, 421 deferred (topology.face_p3 219: SmFace::ComputeLoopOrientation, CreateUVTrimCurves; topology.edgeuse_p3 193: GetOrCreateUVTrimCurve in FixTrimLoopOrder and ComputeUVPoint; topology.face_p4 9: GetEdges, HasSeamProblem), max_rel_err 0; --perturb SENSITIVE (2842/2842). After merging main (PR #52 surface.surface_p3) the 265 CheckLoop cases that deferred at GetSingularities pass bit-identical. UV trim curves that are SmEllipse/SmHyperbola/SmParabola run the inherited SmBSplineCurve GetCanonical/SetCanonical/EditEndPoint (review fix). B-rep ops normalise analytic geometry to B-spline copies as heal.gap. Back-edges wired: SmSurface::CreatePlaneWith3DCurves (surface.surface_p2) now calls OrderCurvesIntoLoops/FindOuterLoops (takes the Kernel). Upstream issues WR-96, WR-97, WR-98 (ported as is), UB-119, UB-120. Plan notes: 49 fns; largest: SmTrimmingTools::OrderCurvesIntoLoops, SmTrimmingTools::FindOuterLoops, SmTrimmingTools::CheckLoop, SmTrimmingTools::CheckFace; cycle back-edges (call into later units; stub or co-port): topology.face_p3(4), topology.edge(2), topology.face_p1(2), topology.face_p4(2), topology.brep_p2(1), topology.brep_p7(1); unit-SCC #22 (220 units); 168 upstream test entry points reach this unit

Difftest

Cases
3,263
Passed
2,842
Deferred
421
Failed
0
Both errored
9
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
topology.face_p3 claimed219
topology.edgeuse_p3 claimed193
topology.face_p4 claimed9

Report JSON (per-case results)

Dependencies

Depends on: curve.curve_p2 green geom.assert_array green geom.extent1d green geom.extent2d green geom.extent3d green geom.object partial geom.point_set green geom.solution_array partial geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green nurbs.b_spline_curve_p2 green topology.edgeuse_p1 partial topology.face_p2 partial topology.loopuse partial

Soft dependencies: curve.curve_p1 partial curve.curve_p4 partial curve.curve_p6 green curve.curve_p9 green geom.context green geom.tools partial intersect.curve_class_p1 partial nurbs.b_spline_curve_n_lib green nurbs.b_spline_surface_p1 green nurbs.b_spline_surface_p2 partial surface.surface_p2 partial surface.surface_p4 green surface.surface_p5 green surface.surface_p6 green surface.surface_p7 partial topology.brep_p8 claimed topology.proto_topology_p1 partial topology.shell claimed topology.vertexuse partial

Dependents: none

Soft dependents: blend.fillet_geom_p4 todo topology.brep_p3 claimed topology.face_p1 partial

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmCurveIntersections::SmCurveIntersectionsSmTrimmingTools.h:469
SmIsoXSectSegment::SmIsoXSectSegmentSmTrimmingTools.h:791
SmIsoXSectSegment::~SmIsoXSectSegmentSmTrimmingTools.h:821
SmIsoXSectSegment::GetMinIndexSmTrimmingTools.h:854
SmIsoXSectSegment::GetMaxIndexSmTrimmingTools.h:904
SmCurveLoops::SmCurveLoopsSmTrimmingTools.h:1251
SmCurveLoops::~SmCurveLoopsSmTrimmingTools.h:1341
SmCurveLoops::IsValidSmTrimmingTools.h:1401
SmCurveLoops::GetNumLoopsSmTrimmingTools.h:1411
SmTrimmingTools::GetClassTypeSmTrimmingTools.h:5311[TYPE], [class_type]
SmTrimmingTools::TrimSurfaceWithModelSpaceCurvesSmTrimmingTools.cpp:87185[trim_surface_with_model_space_curves], [TrimInput]
SmTrimmingTools::AreUVCurvesPresentSmTrimmingTools.cpp:53522[loop_uv_curves_present], [face_uv_curves_present]
SmTrimmingTools::AreUVCurvesPresentSmTrimmingTools.cpp:56314[loop_uv_curves_present], [face_uv_curves_present]
SmTrimmingTools::CreateUVTrimCurvesSmTrimmingTools.cpp:61221[create_uv_trim_curves]
SmTrimmingTools::ClearUVTrimCurvesSmTrimmingTools.cpp:65617[clear_uv_trim_curves]
SmTrimmingTools::SplitAtSeamsSmTrimmingTools.cpp:78442[split_at_seams]
SmTrimmingTools::FixTrimLoopTinyParameterSpaceGapsSmTrimmingTools.cpp:121587[fix_loop_tiny_parameter_space_gaps], [fix_face_tiny_parameter_space_gaps]
SmTrimmingTools::FixTrimLoopTinyParameterSpaceGapsSmTrimmingTools.cpp:130820[fix_loop_tiny_parameter_space_gaps], [fix_face_tiny_parameter_space_gaps]
SmTrimmingTools::EnsureLastEdgeuseUVCorrectSmTrimmingTools.cpp:133449[ensure_last_edgeuse_uv_correct]
SmTrimmingTools::FixBackwardsOuterLoopOnSeamSmTrimmingTools.cpp:1390103[fix_backwards_outer_loop_on_seam]
SmTrimmingTools::FixTrimLoopOrientationSmTrimmingTools.cpp:149929[fix_loop_orientation], [fix_face_loop_orientations]
SmTrimmingTools::FixTrimLoopOrientationSmTrimmingTools.cpp:153518[fix_loop_orientation], [fix_face_loop_orientations]
SmTrimmingTools::FixTrimLoopOrderSmTrimmingTools.cpp:1564125[fix_trim_loop_order]
SmTrimmingTools::OrderCurvesIntoLoopsSmTrimmingTools.cpp:1739353[order_curves_into_loops], [OrderedLoops]
SmTrimmingTools::FindOuterLoopsSmTrimmingTools.cpp:2142312[find_outer_loops]
SmTrimmingTools::CheckFaceSmTrimmingTools.cpp:2702209[check_face], [check_faces]
SmTrimmingTools::CheckFacesSmTrimmingTools.cpp:291721[check_face], [check_faces]
sm_IsLoopUVGapWithinToleranceSmTrimmingTools.cpp:294692[is_loop_uv_gap_within_tolerance]
SmTrimmingTools::CheckLoopSmTrimmingTools.cpp:3069234[check_loop]
SmTrimmingTools::GetEdgeUVExtremesSmTrimmingTools.cpp:3316116[edge_uv_extremes], [EdgeUvExtremes], [edge_uv_ends]
SmTrimmingTools::GetEdgeUVExtremesSmTrimmingTools.cpp:34389[edge_uv_extremes], [EdgeUvExtremes], [edge_uv_ends]
SmTrimmingTools::SurfaceContinuityCheckSmTrimmingTools.cpp:345330[surface_continuity_check]
SmTrimmingTools::MirrorCurveSmTrimmingTools.cpp:348942[mirror_curve]
SmTrimmingTools::IsIsoCurveSmTrimmingTools.cpp:361829[is_iso_curve_at]
SmTrimmingTools::IsIsoCurveSmTrimmingTools.cpp:365325[is_iso_curve_at]
SmTrimmingTools::IsIsoCurveOnSeamSmTrimmingTools.cpp:368419[is_iso_curve_on_seam]
SmTrimmingTools::MinSmTrimmingTools.cpp:39128[min]
SmCurveLoops::SmCurveLoopsSmTrimmingTools.cpp:402332
SmCurveLoops::ResetSmTrimmingTools.cpp:406111
SmCurveLoops::GetLoopStartIndexSmTrimmingTools.cpp:407820
SmCurveLoops::GetLoopStartEndSmTrimmingTools.cpp:410430
SmCurveLoops::FindAdjacentLoopCurveSmTrimmingTools.cpp:414030
SmCurveLoops::FindEnteringAndLeavingSmTrimmingTools.cpp:417977
SmCurveLoops::SampleNearbyPointsSmTrimmingTools.cpp:426259
SmCurveLoops::IsSameSideIntersectionSmTrimmingTools.cpp:432866
SmCurveLoops::AppendLoopSmTrimmingTools.cpp:440033
SmCurveLoops::InsertIntoLoopsSmTrimmingTools.cpp:444037
SmCurveLoops::InsertIsoXSectSegmentSmTrimmingTools.cpp:4484178
SmCurveLoops::UpdateSolutionObjectsSmTrimmingTools.cpp:466950
Module file-header table (23 rows)
RustUpstream
[TYPE], [class_type]SmTrimmingTools_TYPE, SmTrimmingTools::GetClassType
[trim_surface_with_model_space_curves], [TrimInput]SmTrimmingTools::TrimSurfaceWithModelSpaceCurves (region overload)
[loop_uv_curves_present], [face_uv_curves_present]SmTrimmingTools::AreUVCurvesPresent (loop, face)
[create_uv_trim_curves]SmTrimmingTools::CreateUVTrimCurves (face)
[clear_uv_trim_curves]SmTrimmingTools::ClearUVTrimCurves (face)
[split_at_seams]SmTrimmingTools::SplitAtSeams (face)
[fix_loop_tiny_parameter_space_gaps], [fix_face_tiny_parameter_space_gaps]SmTrimmingTools::FixTrimLoopTinyParameterSpaceGaps (loop, face)
[ensure_last_edgeuse_uv_correct]SmTrimmingTools::EnsureLastEdgeuseUVCorrect
[fix_backwards_outer_loop_on_seam]SmTrimmingTools::FixBackwardsOuterLoopOnSeam
[fix_loop_orientation], [fix_face_loop_orientations]SmTrimmingTools::FixTrimLoopOrientation (loop, face)
[fix_trim_loop_order]SmTrimmingTools::FixTrimLoopOrder
[order_curves_into_loops], [OrderedLoops]SmTrimmingTools::OrderCurvesIntoLoops
[find_outer_loops]SmTrimmingTools::FindOuterLoops
[check_face], [check_faces]SmTrimmingTools::CheckFace, CheckFaces
[is_loop_uv_gap_within_tolerance]sm_IsLoopUVGapWithinTolerance (static)
[check_loop]SmTrimmingTools::CheckLoop
[edge_uv_extremes], [EdgeUvExtremes], [edge_uv_ends]SmTrimmingTools::GetEdgeUVExtremes (with and without weights)
[surface_continuity_check]SmTrimmingTools::SurfaceContinuityCheck
[mirror_curve]SmTrimmingTools::MirrorCurve
[is_iso_curve_at]SmTrimmingTools::IsIsoCurve(curve, side, low, tol)
[is_iso_curve]SmTrimmingTools::IsIsoCurve(curve, &side, &param)
[is_iso_curve_on_seam]SmTrimmingTools::IsIsoCurveOnSeam
[min]SmTrimmingTools::Min

Upstream tests reaching this unit

SM_API_test:TestSmOrderCurves, SM_API_test:TestSmCurves, SM_API_test:TestSmCreatePlanarCircle, SM_API_test:TestSmCreatePlanarFaces, prog_test:my_test_single_periodic_vertexuse, SM_API_test:TestSmPlanarFacesFailureCleanup