Files
solvecraft/solidcore/plan/units/surface.surface_cache_p3.toml
Brennen Herbruck 916b91e8d0 Vendor solidcore at solidcore/ with its history (solidcore c0d3cc0124)
solidcore's main at c0d3cc0124, rewritten to one commit per same-author run per
PR (2,800 commits, author credit kept; tree identical). Full original history:
tangency-labs/solidcore archive/full-history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

git-subtree-dir: solidcore
git-subtree-mainline: 44525da669
git-subtree-split: c440e5f892
2026-11-08 15:18:40 -05:00

13 lines
4.8 KiB
TOML
Vendored

id = "surface.surface_cache_p3"
upstream = ["source/SMLib/src/SmSurfaceCache.cpp"]
rust_module = "surface::surface_cache::p3"
depends_on = ["geom.extent1d", "geom.extent2d", "geom.object", "geom.tree", "nurbs.b_spline_surface_p1", "nurbs.nurbs_srf", "surface.surface_cache_p1", "surface.surface_cache_p2", "surface.surface_p2"]
soft_depends_on = ["geom.extent3d", "geom.pseudo_box", "geom.vector2d", "nurbs.b_spline_surface_p2", "surface.trim_srf_cache"]
est_lines = 1703
layer = 25
tests = ["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"]
status = "green"
claimed_by = ""
claimed_at = ""
notes = "BOUND (PR fix/km-binormal, 2026-10-22): MAX_SUBDIVISION_NODES is 2^22 on 64-bit targets (2^20 on 32-bit/wasm32): upstream fixtures reach 2 014 255 nodes (topology.edgeuse_p3 1e-4-scale faces, measured on the C++ build), above the old 2^20. GREEN (PR #140 second review, surface cache iso curves of planes and surfaces of revolution wired): all deferrals compared, 600/600 pass bit-identical, 0 deferred. 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)."