solidcore

Units / surface

surface.surface_cache_p3 partial

Layer
25
Upstream lines
1,703
Functions
7
Rust module
surface::surface_cache::p3

Source: crates/solidcore/src/surface/surface_cache/p3.rs

Upstream: source/SMLib/src/SmSurfaceCache.cpp

Notes

query.tess wired (PR #83): 600 cases, 488 bit-identical, 0 failed, 112 deferred (surface.surface_cache_p1 8, surface.surface_p3 15, surface.surface_p5 32, surface.surface_p6 57); the 38 subdivision-surface split cases now compare. Review validation: 600 cases, 450 bit-identical, 0 failed, 150 deferred (query.tess 38, surface.surface_cache_p1 8, surface.surface_p3 15, surface.surface_p5 32, surface.surface_p6 57); --perturb detected 445/445; max_rel_err=0. surface_p9 FindTessellationSplits wired with the caller Kernel; remaining deferrals are recorded in the current report. Historical notes: PARTIAL: difftest 600 cases (600 generated), 445 pass bit-identical, 0 failed, 155 deferred (surface.surface_p6 57: SmSurface::CalculateContinuities in tree builds; surface.surface_p1 39: GetFace / SnapToKnots; surface.surface_p5 32: SmSurface::IsSingularity in Bezier approximations; surface.surface_p3 15: GetSingularities in pole search; surface.plane_p1 11; surface.surface_p9 1); --perturb 445/445 detected; every Build and Get case defers on CalculateContinuities, so the first-generation node loop of BuildTreeBase, the BuildTree cleanup and GetTree are not yet compared against C++ (only SubdivideNode, SubdivideToTolerances and FindUVNodes on hand-built start nodes are); start nodes over planes are generated too (an SmPlane is an SmBSplineSurface); wired UNPORTED(surface.surface_cache_p3) in surface.trim_srf_cache (BuildTree, FindUVNodes, SubdivideNode) and surface.surface_cache_p1 (GetTree); not wired: the bare-tree patch data reads in geom.tree (GetFirstBezierPatch), geom.grid (SmSurfaceGridElement::Init) and surface.surface_p2 (GetPolarBox) need a patch hand-over from the surface cache to the tree (DISPATCH GAP comments, Unported tagged with the owning units surface.surface_cache_p1 / nurbs.b_spline_surface_p1; see findings.md); after merging main: wired UNPORTED(surface.surface_cache_p3) GetTree in intersect.surface_tracer (FindInteriorCurves now takes &mut SurfaceCache and calls SurfaceCache::get_tree; its counts unchanged, 398 pass / 29 deferred), and re-tagged the three surface.surface_p7 sites to surface.surface_p1 (the SmSP/SmSSGlobalSolver constructors must hand the solvers the caches holding the node patches; GetTree via surface_tree waits on SmSurface::CacheMakeOrValidate for a cache store; surface_p7 unchanged, 3039 pass / 621 deferred); trim_srf_cache test updated: ImplantVertexuse away from poles now completes (FindUVNodes + Evaluate1stDerivatives both ported); 7 fns; largest: SmSurfaceCache::SubdivideNode, SmSurfaceCache::BuildTreeBase, SmSurfaceCache::SubdivideToTolerances, SmSurfaceCache::BuildTree; cycle back-edges (call into later units; stub or co-port): surface.surface_p1(2), query.tess(1), surface.surface_p6(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit [surface.surface_p6 wired (PR #92), merged with query.tess: 600 cases, 545 pass, 0 failed, 55 deferred (surface.surface_cache_p1 8, surface.surface_p3 15, surface.surface_p5 32)] Re-run with surface.surface_p5's back-edges wired (PR #50): cases=600 passed=448 failed=0 deferred=152 max_rel_err=0e0 blocked_by=query.tess(38),surface.surface_cache_p1(8),surface.surface_p3(47),surface.surface_p6(57),surface.surface_p9(2). Re-run (PR #52, after merging surface_p4/#49 and surface_p5/#50): 600 cases, 582 pass, 18 deferred (curve.iso_curve 10, surface.surface_cache_p1 8). surface.surface_p11 (PR #120, after merging main with surface.surface_p3): SubdivideToTolerances stops past MAX_SUBDIVISION_NODES (2^20) tree nodes with InvalidInput (an extreme-scale surface was split into millions of patches; Rust aborted on a 3.5 GB allocation): cases=600 passed=592 failed=0 deferred=8 (surface.surface_cache_p1 8).

Difftest

Cases
600
Passed
592
Deferred
8
Failed
0
Both errored
0
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
surface.surface_cache_p1 green8

Report JSON (per-case results)

Dependencies

Depends on: geom.extent1d green geom.extent2d green geom.object partial geom.tree partial nurbs.b_spline_surface_p1 green nurbs.nurbs_srf green surface.surface_cache_p1 green surface.surface_cache_p2 partial surface.surface_p2 partial

Soft dependencies: geom.extent3d green geom.pseudo_box green geom.vector2d green nurbs.b_spline_surface_p2 partial surface.trim_srf_cache partial

Dependents: query.tess partial surface.surface_p1 partial

Soft dependents: intersect.curve_class_p9 partial intersect.ray_tracer partial intersect.surface_intersector_p5 partial intersect.surface_tracer partial query.face_p2 partial surface.surface_p7 partial surface.surface_p8 partial

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmSurfaceCache::FindUVNodesSmSurfaceCache.cpp:151298[SurfaceCache::find_uv_nodes], [SurfaceCache::find_uv_nodes_built]
SmSurfaceCache::SubdivideNodeSmSurfaceCache.cpp:2423817[SurfaceCache::subdivide_node]
SmSurfaceCache::SubdivideToTolerancesSmSurfaceCache.cpp:4495239[SurfaceCache::subdivide_to_tolerances], [SurfaceCache::subdivide_to_tolerances_with]
SmSurfaceCache::BuildTreeBaseSmSurfaceCache.cpp:4996305[SurfaceCache::build_tree_base], [SurfaceCache::build_tree_base_with], [TreeBase]
SmSurfaceCache::BuildTreeSmSurfaceCache.cpp:5315130[SurfaceCache::build_tree], [SurfaceCache::build_tree_with]
SmSurfaceCache::GetTreeSmSurfaceCache.cpp:545228[SurfaceCache::get_tree]
SmSurfaceCache::SmSurfaceCacheSmSurfaceCache.cpp:569186[SurfaceCache::new] (in part 1)
Module file-header table (7 rows)
RustUpstream
[SurfaceCache::find_uv_nodes], [SurfaceCache::find_uv_nodes_built]SmSurfaceCache::FindUVNodes
[SurfaceCache::subdivide_node]SmSurfaceCache::SubdivideNode
[SurfaceCache::subdivide_to_tolerances], [SurfaceCache::subdivide_to_tolerances_with]SmSurfaceCache::SubdivideToTolerances
[SurfaceCache::build_tree_base], [SurfaceCache::build_tree_base_with], [TreeBase]SmSurfaceCache::BuildTreeBase
[SurfaceCache::build_tree], [SurfaceCache::build_tree_with]SmSurfaceCache::BuildTree
[SurfaceCache::get_tree]SmSurfaceCache::GetTree
[SurfaceCache::new] (in part 1)SmSurfaceCache::SmSurfaceCache

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