Files
solvecraft/solidcore/plan/units/surface.surface_p4.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
6.2 KiB
TOML
Vendored

id = "surface.surface_p4"
upstream = ["source/SMLib/inc/SmSurface.h", "source/SMLib/src/SmSurface.cpp"]
rust_module = "surface::surface::p4"
depends_on = ["curve.curve_p2", "geom.extent1d", "geom.extent2d", "geom.geom_utility_p1", "geom.local_solve_nd", "geom.matrix", "geom.object", "geom.solution_array", "geom.tol", "geom.vector2d", "geom.vector3d", "surface.surface_p2", "surface.surface_p7"]
soft_depends_on = ["curve.crv_on_surf", "curve.line", "surface.plane_p1", "surface.surface_cache_p1"]
est_lines = 2270
layer = 27
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 = "fix (2026-10-30, #1570 mat0076): SmSurfaceEval::EvalNormal now ignores Eval's status as upstream (the normal is made from the matrix a failed zero-tangent correction wrote); new near_flat_gps fixture (202 brute-force drop solves, 88 failed before) and 160 generated thin#### global point solves on near-flat patches (own seed stream, surface.surface_p4.thin; gps_ok admits thin low-degree patches); normal_eval checks the evaluation first as the shim does; difftest 3377 cases, 3377 pass, 0 deferred, max_rel_err 0; --green 277 units, 0 failed. main CI e33985411 (2026-10-23): PASS surface.surface_p4 cases=3015 passed=3015 failed=0 deferred=0. 12 fns; largest: sm_ClassifyCurveSurfaceXSectPoint, SmSSNormalizeENFO::Evaluate, SmCSNormalizeENFO::Evaluate, SmSSINormalizeENFO::Evaluate; cycle back-edges (call into later units; stub or co-port): surface.surface_p1(10), surface.surface_p3(3), intersect.point_class(2), query.face_p2(1), surface.surface_point_solve_p3(1), topology.edge(1), topology.face_p2(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; PORTED (PR #49): 12 fns in surface::surface::p4, difftest 3000 cases: 2711 compared, 289 deferred (surface.surface_p8: SmSPGlobalSolver::LocalSolve in GlobalPointSolve_0; surface.surface_point_solve_p3: GlobalPointSolve_1), --perturb 2711/2711; the Evaluate bodies of SmCSIntersectENFO, SmCSNormalizeENFO, SmSSPIntersectENFO, SmSSINormalizeENFO and SmSSNormalizeENFO are EvalNFunctions impls on surface::surface::p1::{CsIntersectEnfo, CsNormalizeEnfo, SspIntersectEnfo, SsiNormalizeEnfo, SsNormalizeEnfo} (the structs and constructors belong to surface.surface_p1; smsurf_EvaluateNormalSection is surface::surface::p1::evaluate_normal_section); Surface::is_on_seam and Surface::global_point_solve take a &Kernel (SmSurface::IsOnBoundary, SmTol::MapTo2d and SmSurface::IsInDomain are wired to surface.surface_p1); back-edges wired: SmCSNormalizeENFO into SmSurface::LocalCurveSolve (surface.surface_p7, curve.curve_p2 SurfaceEvaluate::local_curve_maximize incl. BSplineSurface), SmSurface::GlobalPointSolve into intersect.point_class, intersect.surface_intersector_p1 (StepBackFromSingularity; &Kernel threaded through compute_point_values, compute_next_point, update_tsect_point, test_point, step_back_from_singularity and the p4 trace callers), intersect.curve_class_p1 (GetCCISurfaceGaps), intersect.topology_solver_p1/p2 (face point solves, untrimmed range endpoints), nurbs.b_spline_surface_p1 (STEPInversion, incl. the Plane dispatch in surface.surface_p2), blend.fillet_custom_solver; sm_ClassifyCurveSurfaceXSectPoint into surface.surface_p9 (nearby intersection); SmSurface::IsOnSeam and SmSurfaceEval::Normal into surface.surface_point_solve_p1/p2 (check_guess_for_seams / refine_guess take &Kernel); no UNPORTED(surface.surface_p4) stubs remain; NOTE for the query.face_p2 porter (face-owned surfaces hit UNPORTED(query.face_p2) in Surface::global_point_solve): upstream disables the surface cache point test (m_bPointTestEnabled, via SmTemporaryChangeValue) around GlobalPointSolve in SmCurveClass.cpp:1040 (surface_global_point_solve), SmTopologySolver.cpp:1665 (topology_solver p2) and SmVertexUse.cpp:471-480; the Rust cache cannot do that yet, so wire the switch-off at those three callers when face-owned surfaces get a real PointClassify; fixed in the third review round: Plane STEPInversion now dispatches the follow-up IsSingularity/IsClosed to the plane overrides (StepInv plane cases added to the surface_p4 runner), curve_class GlobalPointSolve status ignored; second review round: reruns of the touched units pass with 0 failed and their SmSurface::GlobalPointSolve deferrals now name the real callee (surface.surface_point_solve_p3 GlobalPointSolve_1 / surface.surface_p8 / surface.surface_p5 LocalPointSolve): surface.surface_p2, surface_p7, surface_p9, surface_point_solve_p1/p2, surf_of_extrusion_p1, surf_of_revolution_p2, nurbs.b_spline_surface_p1, intersect.curve_class_p1, intersect.topology_solver_p1/p2, intersect.surface_intersector_p1-p4, blend.fillet_custom_solver, topology.proto_topology_p1; surface_p4 itself still 3000 cases: 2711 compared, 289 deferred, perturb 2728/2728; --green 153 units, 0 failed; CO-PORTED here: smsurf_IsPointOnNormal and SmSurfaceEval::EvalNormal (surface.surface_p3); LATE BACK-EDGES (after merging main): the remaining UNPORTED(surface.surface_p4) stubs are wired: surface.surface_p6 (Surface::is_on_seam via the plane override, global_point_solve_starts, the SmCSIntersectENFO local solve in LocalCurveIntersect; SsGlobalSolver now holds the &Kernel) and surface.surface_p10 (sm_ClassifyCurveSurfaceXSectPoint; its shim now carries the verbatim upstream function instead of a stand-in, so the 8 cases that reached it compare bit-identical). difftest surface_p4 2711 pass/289 deferred, surface_p6 1828 pass/271 deferred, surface_p10 523 pass/344 deferred, all 0 failed, --perturb SENSITIVE Re-run (PR #52, after merging surface_p4/#49 and surface_p5/#50): 3000 cases, 2711 pass, 289 deferred (surface.surface_point_solve_p3 243, surface.surface_p8 46). Re-run after merging PR #106 (surface.surface_point_solve_p3 wired, 2026-10-15): 3003 cases, 2957 pass, 46 deferred (surface.surface_p8 46), 0 failed, max_rel_err 0. Re-run after wiring PR #118 (surface.surface_p8 and its back-edges, GlobalPointSolve_0 included): 3003 cases, 3003 pass, 0 deferred, 0 failed, max_rel_err 0; green. Re-run (PR #118, round 3: GlobalPointSolve maximize without a handle): 3003 cases, all pass; --perturb SENSITIVE 3003/3003."