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

id = "surface.offset_surface"
upstream = ["source/SMLib/inc/SmOffsetSurface.h", "source/SMLib/src/SmOffsetSurface.cpp"]
rust_module = "surface::offset_surface"
depends_on = ["geom.extent1d", "geom.extent2d", "geom.extent3d", "geom.object", "geom.polar_box", "geom.pseudo_box", "geom.vector2d", "geom.vector3d", "nurbs.b_spline_surface_p1", "surface.surface_p1", "surface.surface_p2", "surface.surface_p3", "surface.surface_p7", "topology.database_io"]
soft_depends_on = ["geom.axis2_placement", "geom.tol", "nlib.srf_adv_p1", "nlib.srf_basic"]
est_lines = 1787
layer = 31
tests = ["prog_test:my_test_extent3d", "prog_test:my_test_vector2d", "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"]
status = "green"
claimed_by = ""
claimed_at = ""
notes = "GREEN (PR #62): 3077 difftest cases (77 fixtures + 3000 generated), 3077 pass bit-identical, 0 failed, 0 deferred, max_rel_err 0. Extended 100,000-seed run: 100,076 cases, 100,076 pass, 0 failed, 0 deferred, no crash or hang. Promotes intersect.surface_drop_lib_p2 and nurbs.b_spline_surface_p1 to green (their last deferrals were this unit). Adds SurfaceKind::OffsetSurface, kernel-aware copy/split/extension/planarity dispatch, state-preserving STEP inversion and database dispatch; Surface::create_offset_surface dispatches to the plane, revolution (with approx_tol_3d) and offset overrides; an owning offset is its base's owner (BASE_OWNER, upstream m_pSurface->SetOwner(this)) and hands down the face its own owner chain reaches, so the base's GetFace-based tolerances follow upstream (a face-owned offset's expanded box returns Unported(topology.face_p2) instead of the default zone tolerance; LocalPointSolve_1 on the base takes GetZoneTol3d(GetOwner()) as its loose tolerance), and a non-owning offset's base keeps its caller's owner (Surface::clone_keeping_owner); SmSurface::IsPeriodic ignores Evaluate statuses as upstream (Surface::evaluate_ignoring_status; curve-bounded and STEP surfaces pass the array on to their basis); step_inversion_extending stores the extension an offset base's inversion makes. Wires the offset base into the point solver and the intersector kind test. Constructor nesting bounded at 64, JSON bit-roundtrips preserved. The C++ reference runs in process: the shim guards UB-171, UB-172, UB-173 (boxes and IsPlanar's natural-domain box at every level of the offset chain) and HANG-21 on the actual surfaces as the script runs, without changing valid upstream numerics, and CreateExtendedSurface steps are refused (UB-107, HANG-6 and HANG-22 cannot be guarded outside NLib; the per-case worker process that compared them was split out of this PR for a maintainer-reviewed one); the static FFI checks are otherwise well-formedness (no coordinate cap, scale floor or order cap below 64; a revolution base keeps surface.surf_of_revolution_p1's 1e-6 minimum sizes); generated cases cover magnitudes 1e-9 to 1e150, zero/negative scales and orders up to 8; a BaseOffset op compares the CreateOffsetSurface dispatch through SmSurface* over every base kind (distances relative to the base size: a degenerate generator offset copies an uninitialised dMaxGap3d upstream). Candidates the shim refuses are discarded at generation, never counted as passes. The generator keeps reflection extensions of degree-1 NURBs to C-max (UB-32, as nlib.srf_adv_p1). WR-160..WR-165 intentionally retained (WR-166 fixed in nlib.srf_nurb / nlib.srf_adv_p1). Dispatch gaps: the surface cache box callback of an offset (no kernel, no forwarded basis guesses; unreached); SetOffsetDistance through the intersector's shared surfaces waits on blend.fillet_executive_p1. 37 fns; largest: SmOffsetSurface::EvaluatePlainOrSimple, SmOffsetSurface::CalculateBoundingBox, sm_ExtendSurface, SmOffsetSurface::EvaluatePoint; unit-SCC #22 (220 units); 319 upstream test entry points reach this unit. Back-edges wired (PR #62): the SmOffsetSurface CO-PORTED in blend.fillet_custom_solver (PR #78) is now solidcore::surface::offset_surface::OffsetSurface plus the base-pointer SurfaceId; its evaluation stubs call the port, storing extensions (OffsetSurface::with_evaluator runs inherited SmSurface bodies on the offset), and rpSurface2->LocalPointSolve runs SmSurface::LocalPointSolve on the offset; topology.face_p2's thick-face SmOffsetSurface::EvaluateSimple (PR #91) is wired. No UNPORTED(surface.offset_surface) sites remain. Re-runs: blend.fillet_custom_solver 448 cases, 401 pass, 0 failed, 47 deferred (blend.fillet_standard_solver_p2); topology.face_p2 2692 cases, 2322 pass, 0 failed, 370 deferred (offset deferrals 112 -> 0); mass.integrator 1528 cases, 1521 pass, 0 failed, 7 deferred.; CO-PORTED in intersect.surface_drop_lib_p2 (PR #112): the SmOffsetSurface(d, *this, FALSE, lSingularities) DropCurve hands to SmDropPt -> solidcore::intersect::surface_drop_lib::p2::DropOffset (distance and singularities); wired in PR #62: its DropVectors / EvaluateDirectionalDerivs build the ported OffsetSurface over a copy of the drop surface and run the SmSurface bodies (intersect.surface_drop_lib_p2: 1531 cases, 1531 pass, 0 failed, 0 deferred: green) TOUCHED (blend.fillet_solver_p4, PR #212): m_dOffsetDistance is a Cell (set_offset_distance takes &self) so a fillet trace's copy of a solver's offset surface follows the distances the solver sets (upstream: one shared object); 3082/3082 pass. UPDATE (2026-11-04): OffsetSurface::create_extended_surface(_dir) deleted with the fitted surface extension; the (already refused) Extend / ExtendDir steps removed from runner, FFI and shim (steps 15/16), with the degree-1 reflection-extension guard. difftest 3182 cases, all pass bit-identical."