Commit Graph

7 Commits

Author SHA1 Message Date
jijinbei 875291c4d9 shim: share identical C++ helpers through sc_sm.h, sc_nlib.h, sc_gw.h
125 shims carried private copies of the same small helpers (put_vec, st,
nl_status, Rd, dump_crv, read_nurb, ...). Move the most common, byte-identical
form of each into three headers grouped by the upstream API they need, and have
those shims pull them in with `using sc::<name>;`. Shims with a different
variant keep their own copy; files touched by open PRs are left alone.
`the_context()` stays per shim (its function-local SmContext must not be shared).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBLgPenT24P1dunqnZR1Dj
2026-10-17 06:43:03 +09:00
Andreas 0986f446fa surface.surface_p8: review round 3 (PR #118): merge main, wire sm_IntersectSrfBndryCrv/sm_ExtractIsoCurve into p11, plane iso curves through the plane, maximize without handle, UB-130
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 12:17:00 +02:00
Andreas e2937cf39b surface.surface_p8: review round (PR #118)
Plane fallback line interval, InvertPointNearSingularity tolerance and
DropPoint result, sm_ExtractIsoCurve tolerance, ignored statuses
(GlobalCurveIntersect combine, SpLocal add, CreateBlendSurface,
coincidence evaluations with only_upper_half), non-zero tangents in
sm_IntersectSrfBndryCrv, GlobalPointSolve_0 wired with the kernel and the
surface handle, UB-116 -> UB-119 and HANG-14 -> HANG-15, volume_p1 and the
units whose surface_p8 deferrals are gone promoted to green.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 07:43:37 +02:00
Andreas 33915c6f78 surface.surface_p11: bound surface cache subdivision (3.5 GB abort), filter the GSS generator's scales
SubdivideToTolerances refuses to split past MAX_SUBDIVISION_NODES (2^18) tree nodes:
an extreme-scale surface was split into millions of Bezier patches and Rust aborted
on a 3.5 GB allocation while generating surface.surface_p7 solve cases. The p7
generator checks the other surface's scale too; the shim's put_sols takes a
non-const array.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:25:47 +02:00
Andreas b06b6fdbc6 surface.surface_p11: compare global solve solutions, generate CS/SS solves over every operation (WIP)
GlobalCurveSolve/GlobalSurfaceSolve difftest cases now compare the first 16 solutions
(type, value, parameters), not only their count; the p7 generator adds normalize and
signed directed curve solves and generated surface/surface solves (a patch lifted clear
above the surface; intersect for node pairs). The generator checks the scale before the
Rust run (which now runs the solve). CsGlobalSolver::BranchMayContainAnswers uses the
solve cache's polar boxes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:47:05 +02:00
Pluto-XI 4dca7c953c surface.surface_p7: before-ready checklist, reports
Checklist (AGENTS.md section 4.5): SmPlane::IsClosed is plane_p1's (ported),
not a plane_p2 stub; CreateParallelProjectionCurves keeps its approximation
and angle tolerances; no UNPORTED tag for the partial surface_cache_p1; the
FFI accepts any finite IsClosed/IsPlanar tolerance; the shim builds
curve-bounded surfaces; the generator adds 1e-4/1e4 scales and keeps the
always-deferred global solves at unit scale (GlobalSurfaceSolve is
fixture-only: intersecting surfaces take upstream minutes).

difftest: 3658 cases, 3029 pass bit-identical, 0 fail, 629 deferred.
Upstream issues UB-73, WR-48..50. Unit tests that asserted the old stubs now
check the wired results. Reports of the touched units regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 18:21:11 -06:00
Pluto-XI e8c3833b88 port: surface.surface_p7
SmSurface part 7 in surface::surface::p7: EvaluateNormal (all fall-backs) and its
kind dispatch, IsClosed, IsPlanar, GetBrep, GetFlatCorners,
ApproxDerivativeLengths, ComputeHigherOrderDerivs, ComputeInwardVector,
DropPointsToTangentPlane, DropVectors, FindDegenParamForDirection,
GlobalPointSolve_0, GlobalCurveSolve, GlobalSurfaceSolve, LocalCurveSolve,
CreateParallelProjectionCurves, SmSPGlobalSolver/SmSSGlobalSolver
BranchMayContainAnswers and the file-static helpers. Co-ports
Evaluate1stDerivatives, Evaluate2ndDerivatives and EvaluateDirectionalDerivs
from surface.surface_p1 (recorded in its notes).

Shim (verbatim static helpers), ffi wrapper, difftest runner with degenerate
surface generators, 656 fixtures. difftest: 3656 cases, 2918 pass
bit-identical, 0 fail, 738 deferred -> partial.

Back-edges wired in b_spline_surface p1/p2, b_spline_surface_n_lib p1/p2,
curve_bounded_surface, surface_cache p1, plane p1, trim_srf_cache,
crv_on_surf, tangent_field (SurfaceEvaluate::evaluate_normal) and curve p2;
all re-run pass, 464 newly compared cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 17:07:31 -06:00