mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-16 13:40:58 +00:00
916b91e8d0
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:44525da669git-subtree-split:c440e5f892
13 lines
21 KiB
TOML
Vendored
13 lines
21 KiB
TOML
Vendored
id = "offset.offset_geometry_creation"
|
|
upstream = ["source/SMLib/inc/SmOffsetGeometryCreation.h", "source/SMLib/src/SmOffsetGeometryCreation.cpp"]
|
|
rust_module = "offset::offset_geometry_creation"
|
|
depends_on = ["curve.curve_p2", "geom.axis2_placement", "geom.extent1d", "geom.object", "geom.solution_array", "geom.tol", "geom.vector3d", "nurbs.b_spline_curve_n_lib", "nurbs.b_spline_curve_p1", "nurbs.b_spline_curve_p2", "nurbs.b_spline_surface_p2", "surface.offset_surface", "surface.surface_p1", "surface.surface_p2", "topology.edge", "topology.edgeuse_p1", "topology.vertex"]
|
|
soft_depends_on = ["blend.fillet_solver_p1", "blend.fillet_standard_solver_p1", "curve.crv_on_surf", "curve.curve_p1", "curve.curve_p4", "curve.curve_p5", "curve.curve_p6", "curve.curve_p8", "geom.extent2d", "geom.extent3d", "geom.geom_utility_p1", "geom.geom_utility_p2", "geom.vector2d", "intersect.surface_drop_lib_p1", "nurbs.b_spline_surface_n_lib_p1", "nurbs.b_spline_surface_p1", "query.edge", "surface.surface_p11", "surface.surface_p7", "surface.surface_p8", "topology.brep_p1", "topology.brep_p2", "topology.edgeuse_p2", "topology.edgeuse_p3", "topology.face_p2", "topology.face_p4", "topology.topology", "topology.vertexuse"]
|
|
est_lines = 2661
|
|
layer = 51
|
|
tests = ["SM_API_test:TestSmOffsetBrepFull", "SM_API_test:TestSmShellBrepFull", "prog_test:airfoil_offset", "prog_test:my_local_op", "prog_test:my_local_op_regression", "prog_test:my_test_offset", "pt_TestFiles/Fillet/nurb_box.smb", "pt_TestFiles/Solids/box.smb", "pt_TestFiles/Solids/cylinder.smb", "pt_TestFiles/offset_nurb.sms"]
|
|
status = "partial"
|
|
claimed_by = ""
|
|
claimed_at = ""
|
|
notes = "2026-11-05 (branch localop/keep-unmoved-edges, the exact surface extension; plan/findings/surface.exact-extension--difftest-cases-moved-2026-11-05.md): PARTIAL offset.offset_geometry_creation cases=926 passed=863 failed=0 deferred=6 rejected=16 known_mismatch=41 blocked_by=topology.face_p2(6): 41 known mismatches where the exact extension replaces the fitted one, and 6 MateEdges cases deferred at the unported topology.face_p2 now that the exact intersection curve of extended surfaces is clipped to its pieces inside both domains (3ab3d7f11; native stops there at 1006); gen0658, a known mismatch before, is one of the 6. 2026-10-30 (the Rust side now makes every B-rep itself: wires, faces and the network through crate::own_builder::build_as, the concrete cylinder and torus faces through native_face, .smb files through read_with as before; nothing of the shim's export reaches the Rust side): the previous GREEN (and every count below) rested on Rust-side inputs imported from the C++ build for every non-file source, so it overstated what was verified: those builds and everything downstream of them were compared C++ against C++. Counts on the Rust-built inputs follow this change's difftest run; any new mismatch gets a finding with its case IDs. 2026-10-28 (the runner no longer copies the C++ face-surface cache states onto its B-reps, seed_cache_tree_states removed, and reads .smb file sources with the Rust reader, crate::own_builder::read_with; the renumbered copy keeps the read's face-surface cache slots, Surface::copy_cache_slot_of): GREEN offset.offset_geometry_creation cases=926 passed=910 failed=0 deferred=0 rejected=16 known_mismatch=0 (gen0266 passes on the Rust read's own cache state, plan/findings/topology.brep_p7--read-from-file-leaves-no-face-surface-caches--addendum-2026-10-28-renumber-cache.md; gen0129 gen0152 gen0258 still compare SM_ERR on both sides). 2026-10-27 (11 inline cases: VertexOffset with three arcs whose ends miss another arc's plane, the arc rebuilt through the circle-plane intersections, and the coincident-plane and missed-plane SM_ERR; UpdateFaceSurfaceDomain after scaled, moved, shrunk and disjoint UV trim curves, the extended-surface replacement being unreachable because CalculateUVDomainFromUVTrimCurves limits the domain by default; EdgeuseOffset torus cap with coincident rails and rails within ten edge tolerances): GREEN offset.offset_geometry_creation cases=926 passed=910 failed=0 deferred=0 rejected=16 known_mismatch=0. 2026-10-26 (EdgeuseOffset torus caps, rail swap, self-intersecting torus with and without the axis-ray trim, 8 seeded tori and the tangent-sector gaps SM_ERR: 17 new inline cases; the rayfire on the owner-less arc resolves SmTol::GetZoneTol3d(pArc) to the system zone tolerance): GREEN offset.offset_geometry_creation cases=915 passed=899 failed=0 deferred=0 rejected=16 known_mismatch=0. 2026-10-26 (WR-255 opt-in, #959: upstream's corner-drop stretch is the default; gen0350's known mismatch removed): GREEN offset.offset_geometry_creation cases=898 passed=882 failed=0 deferred=0 rejected=16 known_mismatch=0. 2026-10-26 (solves on a face-owned surface reuse the trimmed cache the surface keeps, gen0346 fixed; gen0350 confirmed as WR-255, plan/findings/offset.offset_geometry_creation--addendum-2026-10-25-kept-trim-cache-and-wr-255.md): PARTIAL offset.offset_geometry_creation cases=898 passed=881 failed=0 deferred=0 rejected=16 known_mismatch=1 (gen0350, WR-255 corner-drop stretch, pending #959). 2026-10-25 (UV-curve fallback copies slice to a plain B-spline as upstream's non-virtual SmBSplineCurve::Copy overload does, WR-267): 898 cases, 880 passed, 0 failed, 0 deferred, 16 rejected, 2 known mismatches (gen0346 sphere self-intersection in MateEdges, gen0350 knots after ExtendTrimEdges; plan/findings/offset.offset_geometry_creation--addendum-2026-10-25-slicing-uv-curve-copy.md); gen0248 and gen0508 now pass. 2026-10-25 (the drop onto the other extended surface reaches its face's cache): PARTIAL offset.offset_geometry_creation cases=898 passed=869 failed=0 deferred=9 known_mismatch=4 blocked_by=topology.face_p2(9) (was 836 / 46 with topology.face_p2(45); the remaining 9 reach SmSurface::DropCurve inside the trace; 4 known mismatches, plan/findings.md 'offset.offset_geometry_creation: drops onto a seeded extended surface through a freshly built face cache'). HANG-26 cases rejected, not deferred (2026-10-24): a script whose Rust run stops at a non-local FaceuseOffset of an exact SmSurfOfRevolution face with self-intersection (HANG-26), or at an EdgeuseOffset beyond the HANG-27 distance bound, is an input upstream does not return on (AGENTS.md 5.6): run_cpp follows the Rust script first and returns Output::rejected naming the issue, so neither side runs (the shim's -6 stop stays as a safety net). difftest 898 cases, 835 pass, 0 failed, 47 deferred (topology.face_p2 46, surface.trim_srf_cache 1), 16 rejected (HANG-26); was 63 deferred (upstream:HANG-26 16) (plan/findings.md 'Remaining native-guard cases are rejected, not deferred'). PR #697 (2026-10-24, face surfaces keep their trimmed caches): 898 cases, 835 passed, 0 failed, 63 deferred (3 deferred -> pass). main CI e33985411 (2026-10-23): PARTIAL offset.offset_geometry_creation cases=898 passed=832 failed=0 deferred=66 blocked_by=surface.trim_srf_cache(1),topology.face_p2(49),upstream:HANG-26(16). Post-#307 (main e3425b27d1f45a7c60e56239567b967f6b7d4d41, CI run 39861450243): native 898 cases, 795 passed with values, 103 deferred, 0 failed; max_rel_err=0, rel_tol=1e-9, floors=[]; deferred: topology.face_p2 58 (50 unbound-face SmFace handle of a surface's face + 8 SmFace::GetTolerance), intersect.surface_drop_lib_p3 28 (SmSurface::DropCurve), upstream:HANG-26 16, surface.surface_p2 1 (SmSurfOfExtrusion as SmSurface). #307 resolved 49 of the 62 crv_on_surf deferrals: 62 crv_on_surf -> 49 pass + 11 face_p2 unbound-face + 1 face_p2 GetTolerance + 1 surface_drop_lib_p3. The 11 new unbound-face cases (gen0016 gen0105 gen0173 gen0274 gen0339 gen0341 gen0357 gen0494 gen0577 gen0619 gen0791) are in extend_trim_edges -> drop_and_trim_curve -> surface_drop_curve, not CrvOnSurf; gen0681 is the new GetTolerance case and gen0600 moved to surface_drop_lib_p3. Status remains partial. Historical #549 evidence (branch followup/offset-ssi-context, clean 903ff58289254e32b493e636f397693b510b16fd baseline, merged with 6d3bc74f6): native 898 cases, 746 passed with values, 152 deferred, 0 failed; max_rel_err=0, rel_tol=1e-9, floors=[]; clean 903ff baseline 715/183/0. 31 genuine deferred->pass gains (gen0024 gen0037 gen0040 gen0074 gen0096 gen0120 gen0182 gen0213 gen0302 gen0304 gen0313 gen0368 gen0383 gen0386 gen0410 gen0413 gen0454 gen0457 gen0460 gen0475 gen0503 gen0505 gen0560 gen0623 gen0629 gen0682 gen0708 gen0726 gen0755 gen0759 gen0799), zero pass->defer and zero pass->fail transitions. Blocked by curve.crv_on_surf(62), intersect.surface_drop_lib_p3(27), surface.surface_p2(1), topology.face_p2(46), upstream:HANG-26(16); the 46 face_p2 are 39 cache-tree unbound-face deferrals (surface_drop_lib/surface_drop_curve) plus 7 SmFace::GetTolerance, all in other units' paths. Change: SurfaceSolveContext<O> prepares each intersected surface's cache with the caller's surface handle (upstream GetSurfaceCache reaches the owning face); LiftCurve and DomainWithContinuity thread the same context. MateEdges passes one evaluation copy for both surfaces when the extended-surface handles are equal, preserving SurfaceIntersector::doing_self_intersection (pointer identity, one cache) as the C++ does. Status remains partial. Historical notes: PR #533 evidence against immutable authoritative f87f16b47 (not the latest ad2f42ec4 integration, which is being retested): native 898 cases, 715 passed with values, 183 deferred, 0 failed; max_rel_err=0, rel_tol=1e-9, floors=[]; all 713 baseline passes retained. Two real gains: nurb_box_trim_and_replace 1040 values; gen0736 981 values. cylinder_seam_vertex_and_edge_caps and gen0218 remain deferred, not gains. Sensitivity 715/715. Shared #537 CacheFace/BrepCacheFace reused; immutable prepared queries/tagged solver dispatch/lazy cache. Remaining blockers: curve.crv_on_surf 29, intersect.surface_drop_lib_p3 16, surface.surface_p2 1, topology.face_p2 121, upstream:HANG-26. Executive p1/p2 reports byte-identical to fresh f87f16b47 main. Status remains partial; no complete offset SSI/shell certification. Historical notes follow unchanged. PR #522, integrated through main b8d3ce6d6: 898 cases, 713 passed with values, 185 deferred, 0 failed; max_rel_err=0, rel_tol=1e-9, no absolute floors; sensitivity 713/713. Native baseline on 161925132: 874 cases, 631 passed, 243 deferred, 0 failed. All 631 old passes remain passing; 58 old deferrals and 24 new signed/zero-distance native cases pass. The 80 analytic-import deferrals become 58 passes, 5 topology.face_p2, 1 intersect.surface_drop_lib_p3, and 16 genuine upstream:HANG-26 guards. Remaining blockers: curve.crv_on_surf 29, intersect.surface_drop_lib_p3 16, surface.surface_p2 1, topology.face_p2 123, upstream:HANG-26 16. Exact version-33 input records preserve concrete types, owners and NURBS; real SmCylinder/SmTorus fixtures avoid relying on misleading .smb names. Native import/decoder/guard tests pass; 384 fuzz probes have zero differences, crashes, panics or timeouts. Executive p1/p2 reports remain byte-identical to baseline. No kernel algorithm duplication, native operation replay, tolerance change or complete offset/shell certification is claimed; status remains partial. Historical notes below are retained for provenance; their older validation counts and analytic-import limitations are superseded. PR #288 keeps the full creator API and its existing vertex algorithm; the new narrow VertexBackend delegates to that same implementation. Original vertex/tolerance reads and result edge/face geometry use typed cross-arena handles, with owned cap/curve outputs taken once. The numerical creators are not duplicated. The broader executive arena/SSI backend remains outside this vertex follow-up; #201 coordination retains that boundary. Main B-rep, face-domain and exact revolution import updates are preserved. Current native evidence: 874 cases, 585 passed, 289 deferred, 0 rejected, 0 failed; max_rel_err=0.0, rel_tol=1e-09; no new absolute floors. Historical upstream notes (not current validation): partial (PR #156, stacked on PR #224 and PR #147): 874 cases (5 fixtures, 69 built in code, 800 generated two-B-rep scripts), 565 pass bit for bit, 0 fail, 309 deferred after main e5f3e441 (#149 wired topology.brep_p2's stubs; 441 pass, 433 deferred before, 166 of them topology.brep_p2): harness:analytic-geometry-export 107 (non-plane analytic faces imported as their B-spline part), geom.tol 82 (the trimmed surface cache of a face's own surface, returned by the seeded GetCreateExtendedSurface: SmTol::GetZoneTol3d(const SmObject*), reached before the B-rep editing flag; labelled topology.brep_p1, then surface.surface_cache_p2, before main's relabelling to geom.tol), topology.face_p4 43, curve.crv_on_surf 27 (offset-surface rail: CrvOnSurf over a non-B-spline surface), intersect.surface_drop_curve 17, topology.face_p2 13, blend.fillet_standard_solver_p1 11, intersect.surface_drop_lib_p3 7, surface.sphere 2 (SmSphere::IsNurbSurfaceSphere; surface.cone_p2 before #153), 0 both-errored, with_values=565 no_values=0 (560 compare an upstream result, network_vertex_three_edges among them an error status from the 3-edge branch; 2, gen0264 and gen0685, are guard agreements: the shim refuses the only op as an upstream null dereference and no C++ runs; gen0191 and gen0255, passing since #149, are three-value records too, not probed); no compared case runs CreateExtendedSurface (the seeded lookups always hit); HaveTangentGaps mirrors upstream's unchecked NormalizedEvaluate with the SM_UNDEF_DOUBLE point; 327 passes complete a successful unit op; --perturb SENSITIVE 565/565; --seeds 4000: 4074 cases, 2650 pass, 0 fail, 1424 deferred; --fuzz 2000 FUZZ-PASS at the #156 head and FUZZ-FAIL with 1 timeout at the follow-up head, fuzz01915, a 1e300-control-point draw slow on the Rust side only (the verdict depends on the draw: earlier runs drew the known gen0577 budget flake (also a risk at a zeroed header) and two more such draws, the curve-cache per-call rebuild of curve.curve_p5's Caches deviation, see the curve.curve_p8 findings entry; a negative tolerance is now refused by the runner as by the FFI); green-par 234 units failed=0 (main e5f3e441) (VertexOffset keeps only its per-edge checks: it walks no loops, so wire and network vertices are compared; HaveTangentGaps accepts n = 0, maintainer review of #156; second round: the run header accepts dist == 0 and approx == 0, only a negative tolerance is refused; all 800 generated scripts return and agree at each zero, 67 compared results change at dist == 0 through FaceuseOffset or VertexOffset, 2 at approx == 0 through VertexOffset; 8 *_zero_distance / *_zero_approx cases on explicitly named bases whose compared output changes at zero (one a B-spline face offset), all pass). Wired: surface.offset_surface (PR #62: CreateOffsetSurface dispatch, SetAllowExtension(FALSE), the rail's SmOffsetSurface), offset.offset_executive_p1 (PR #175: GetCreateExtendedSurface through OffsetExecutive::get_create_extended_surface; the runner wraps #175's OffsetExecutive behind this unit's OffsetExecutive<O> trait, which is no longer a co-port) and topology.edgeuse_p3 (PR #117: NormalizedEvaluate, CreateUVTrimCurve). The shim seeds the executive's extended-surface cache before each op (the runner seeds #175's the same way, insert_extended_surface), so neither side runs CreateExtendedSurface (HANG-16, HANG-17). Needs PR #147's owner-keeping surface-cache copy (clone_for_evaluation): without it 5 cases fail (the trimmed cache of a face's surface ran standalone). Hang guards (-6, script stops): HANG-26 (non-local FaceuseOffset on an inexact analytic face, already a harness:analytic-geometry-export deferral) and HANG-27 (EdgeuseOffset with |dist| > 1e6, deferred as upstream:HANG-27; bound chosen for the fuzz time budget, not the termination boundary ~1e250). Crash guards (-2) mirror the shim; local pairs name store surfaces only. Follow-up after this PR merges: offset.offset_executive_p1's own UNPORTED(offset.offset_geometry_creation) EdgeuseOffset/VertexOffset stay stubbed (they need an OffsetBrep over the executive's original/offset Brep ids, and #175's code after EdgeuseOffset, cpp:2956-3071, is not ported and reaches topology.brep_p7/p8). CO-PORTED here: SsiData<O> (SmSSIData). TOUCHED elsewhere: nurbs.b_spline_surface_p2 create_sphere_from_arcs (WR-103 reproduced, arcs as Curve); offset.offset_executive_p1 insert_extended_surface. 15 fns; largest: SmOffsetGeometryCreation::EdgeuseOffset, SmOffsetGeometryCreation::TrimExtendedEdge, SmOffsetGeometryCreation::ExtendTrimEdges, SmOffsetGeometryCreation::MateEdges; cycle back-edges (call into later units; stub or co-port): offset.offset_executive_p1(9); unit-SCC #26 (2 units); 11 upstream test entry points reach this unit Re-run in PR #149 (review 5578349117 round, merged with main through fb58ea76; topology.brep_p2's UNPORTED stubs wired): 861 cases, 542 pass, 0 fail, 319 deferred (harness:analytic-geometry-export 126, surface.surface_cache_p2 82, topology.face_p4 43, curve.crv_on_surf 27, blend.fillet_standard_solver_p1 11, topology.face_p2 13, intersect.surface_drop_curve 8, intersect.surface_drop_lib_p3 7, surface.sphere 2); of the 166 topology.brep_p2 deferrals (SmBrep::Notify 161, MateLaminaEdgeToSurface 5; both wired, the B-rep edits through OffsetBrep) 120 pass and the rest relabel. LiftCurve now returns the iso curve with its own kind (an SmLine / SmCircle; surface.surface_p11), which ExtendTrimEdges stores as the offset edge's curve. On a face the runner imports as its B-spline part the Rust runs the B-spline CreateIsoParametricCurve instead of the subclass's, so ExtendTrimEdges (and EdgeuseOffset's ExtendTrimEdges path) defer as harness:analytic-geometry-export when the lift's UV curve (the edge use's or its radial's) is a degree-1 iso line and the offset edge use's face is not exact; 6 cases that passed on main fall in that class (their subclass override happened to return a B-spline) and now defer (gen0009, gen0119, gen0148, gen0376, gen0520, gen0707). Exact SmSurfOfRevolution faces (#149 review round, after da779c51): the shim's Export appends each exactly-SmSurfOfRevolution face surface's binary WriteToDB record and the runner reads it back with SurfOfRevolution::read_from_db (face marked exact); put_curve exports every SmBSplineCurve kind (type + NURB); the non-local FaceuseOffset HANG-26 stop is keyed on the face's subclass type as the shim's. 861 cases, 552 pass, 0 fail, 309 deferred (harness:analytic-geometry-export 107, surface.surface_cache_p2 82, topology.face_p4 43, curve.crv_on_surf 27, intersect.surface_drop_curve 17, topology.face_p2 13, blend.fillet_standard_solver_p1 11, intersect.surface_drop_lib_p3 7, surface.sphere 2): 10 harness deferrals pass (the revolution lifts gen0009, gen0148, gen0520, gen0683 and gen0070, gen0178, gen0187, gen0597, gen0698, gen0767), 9 relabel to intersect.surface_drop_curve; gen0119 / gen0707 (SmSurfOfExtrusion) and gen0376 (SmSphere) stay deferred (no Rust surface kind for them; tracked in issue #76, Kernel-aware Surface dispatch for analytic surface kinds). topology.face_p4 (PR #239) wires face_p3's GetUpwardLoopuses, so UpdateFaceSurfaceDomain runs past CalculateUVDomainFromUVTrimCurves: on a face imported as its B-spline part it now defers under harness:analytic-geometry-export (its virtual surface calls and the compared face surface are the B-spline kind's; 13 such cases mismatched the analytic SmSurfOfRevolution). After main's exact SmSurfOfRevolution import (#315) only inexact faces defer there: 874 cases, 585 pass, 0 failed, 289 deferred (main without this PR: 565/309). Owner zone-tol cache (surface/owner-zone-tol): 874 cases, 589 pass, 0 fail, 285 deferred. Face-cache/solve follow-up (branch followup/offset-face-tolerance, merged 422f71321, CI run 39879315744 baseline 818/80/0): native 898 cases, 820 passed with values, 0 failed, 78 deferred; max_rel_err=0, rel_tol=1e-9, floors=[]; +2 genuine deferred->pass (cylinder_seam_vertex_and_edge_caps, gen0218); no pass->defer, pass->fail or relocation; blocked_by=topology.face_p2(58),upstream:HANG-26(16),upstream:cache-history(4). The excluded face-bound ExtendTrimEdges cache experiment (819 pass / 2 fail on base 89c94bf) and its iso guard (818 pass / 1 fail) are in plan/findings.md. 3 CreateUVTrimCurves cases remain #463 scope; this PR does not change them. Lazy surface cache trees (#568, PR #571, on #463 4243bec79): native 898 cases, 822 passed with values, 76 deferred, 0 failed; max_rel_err=0, rel_tol=1e-9, floors=[]; deferred: topology.face_p2 59, upstream:HANG-26 16, surface.trim_srf_cache 1. The Export appends each face surface's cache state after the C++ build and the runner seeds the imported surfaces (Surface::set_cache_tree_state); the upstream:cache-history deferral and OP_LIFT_OFF_DOMAIN are removed and its 4 cases pass (gen0266 compares a success, gen0129 gen0152 gen0258 SM_ERR on both sides). gen0308 now defers at surface.trim_srf_cache (the tracer constructor's GetTree on a face-owned surface) instead of topology.face_p2. Status remains partial. 2026-10-31, PR #1775 / complete #483 audit: offset_tangent_gap_statuses checks normalized evaluation and closest point; successful no-solution remains distinct from failure. Inventory and regressions: plan/findings/general--status-audit-483.md. Default-off flags preserve the pinned C++ behavior; no tolerance or native case waived. Validation at d54dfd462: native difftest 926 cases, 910 pass, 0 failed/deferred, 16 existing rejected; perturb SENSITIVE on every accepted case. Full 280-unit exact-base gate passed."
|