Files
solvecraft/solidcore/plan/units/primitive.api_primitives.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
8.0 KiB
TOML
Vendored

id = "primitive.api_primitives"
upstream = ["source/SM_API/src/SmApiPrimitives.cpp"]
rust_module = "primitive::api_primitives"
depends_on = ["geom.vector3d", "primitive.primitive_creation_p1", "primitive.primitive_creation_p2", "surface.cone_p1", "surface.plane_p1"]
soft_depends_on = ["curve.line", "geom.axis2_placement", "geom.context", "geom.extent2d", "geom.object", "primitive.primitive_creation_p3", "surface.torus", "topology.brep_p1", "topology.brep_p3", "topology.brep_p4", "topology.brep_p5", "topology.brep_p8"]
est_lines = 910
layer = 59
tests = ["SM_API_test:TestSmCreatePlanarCircle", "SM_API_test:TestSmCreatePlane", "SM_API_test:TestSmCreateSwungPrimitive", "SM_API_test:TestSmAdvancedStitch", "SM_API_test:TestSmEdgeCurveOwnership", "SM_API_test:TestSmGetClosestPoint"]
status = "green"
claimed_by = ""
claimed_at = ""
notes = "2026-10-29 (SM_API 1.0.1 parity, S4): adds SmApiCreateOffsetProfile (create_offset_profile, on primitive_creation::p1::offset_profile): shim op 27 (profile curves: SmApiCreateLineSegment, SmApiCreateArc, SmApiCreateCircle SmCircle, SmBSplineCurve::CreateLineSegment / CreateCircleSegment), ffi run_offset_profile, runner op offset_profile, fixtures/primitive.api_primitives/offset_profile.json (prog_test smSweepTest test 8's profile plus squares, circles, slots, error cases) and a separate `offset` generated stream (MIN_GENERATED_OFFSET = 160) so every `gen` case is unchanged. Summary line: PENDING (builder run). UB-119 cases rejected, not deferred (2026-10-24): a pyramid whose plane fit hits FindOuterLoops' zero-area loop (the port's find_outer_loops InvalidInput 'index out of range', exactly where upstream reads past sOutLoops) is an input undefined in C++ (AGENTS.md 5.6): run_cpp decides it with the Rust create_pyramid and returns Output::rejected naming UB-119, so the C++ no longer runs it. difftest 2024 cases, 1907 pass, 0 failed, 112 deferred (topology.face_p4 112), 5 rejected (UB-119); was 117 deferred (cpp-guard:ub-119 5) (plan/findings.md 'Remaining native-guard cases are rejected, not deferred'). main CI e33985411 (2026-10-23): PARTIAL primitive.api_primitives cases=1981 passed=1623 failed=0 deferred=358 blocked_by=cpp-guard:ub-119(5),surface.trim_srf_cache(133),topology.edgeuse_p3(46),topology.face_p2(62),topology.face_p4(112). PARTIAL (PR #160): difftest 1981 cases (481 fixture: 54 from SM_API_test TestSmPrimitives/TestSmBrep/TestSmSurfaces/TestSmIntersectors/TestSmBrepCopy/TestSmErrorCodes, 211 edge cases, 216 review adversarial cases; 1500 generated): 1445 pass bit-identical (full surface records of the plane/cylinder/cone/torus surface overloads, the rest B-rep input validation and the pyramid base-edge statuses; base line geometry is never compared because every successful base defers at topology.brep_p8), 536 deferred (primitive.primitive_creation_p1 136, primitive.primitive_creation_p2 282, primitive.primitive_creation_p3 31, topology.brep_p8 87), max_rel_err 0, perturb 1445/1445 detected; torus surface crash guard applies only when both radii exceed SM_EFF_ZERO (the C++ gate); SmApiCreateBlendPrimitive not difftested (needs a B-rep with faces); C++ crash/hang inputs fenced off by the ffi guard (UB-198..181, HANG-31); 24 fns; largest: SmApiCreatePyramid, SmApiCreateCone, SmApiCreateCylinder, SmApiCreateCylindricalBox; entry points: SmApiCreateBlendPrimitive, SmApiCreateBox, SmApiCreateCone, SmApiCreateConeEllipticEnds, SmApiCreateCylinder, SmApiCreateCylindricalBox, SmApiCreatePartialCone, SmApiCreatePartialCylinder, SmApiCreatePartialSphere, SmApiCreatePartialTorus, SmApiCreatePlanarCircle, SmApiCreatePlane, SmApiCreatePyramid, SmApiCreateSphere, SmApiCreateSphereNoPole, SmApiCreateSwungPrimitive, SmApiCreateTorus; 84 upstream test entry points reach this unit NOTE (PR #204, topology.brep_p3): the nine UNPORTED(topology.brep_p3) SmBrep::SmBrep markers (create_box, create_pyramid, ...) are left as they are: brep::p3::new_brep needs k: &mut Kernel, these public functions take no kernel (upstream's SmApiCreate* take no context), and every case stops at primitive.primitive_creation_p1 right after; wiring them means adding a kernel parameter to the API (left to the overseer / this unit). UPDATE (PR #204, overseer decision on the NOTE above): the nine SmBrep::SmBrep markers are wired kernel-free: new SmBrep() is topology::Brep::new_with_infinite_region (the topology part of topology.brep_p3's constructor), so the context zone tolerance / size settings and the SM_NO_CONSTRUCTION notification are not applied (module Deviations; the same deviation as blend.fillet_geom_p1's FilletBrep::new). Every case still stops at primitive.primitive_creation_p1..p3 / topology.brep_p8 right after. base line geometry is never compared because every successful base defers at topology.brep_p8), 536 deferred (surface.sphere 1, topology.brep_p3 448, topology.brep_p8 87), max_rel_err 0, perturb 1445/1445 detected; PR #213 review integration (main e5f3e441): plane/disc APIs call p1 with caller Kernel and native no-face SM_ERR checks, all 13 p1 tags removed; new-Brep helpers defer at the first actual SmBrep::SmBrep dependency, while blend constructs p1 on its existing B-rep; refreshed native report keeps 1445 exact comparisons and 536 deferrals, with no native primitive-topology certification; UPDATE 2026-10-23 (branch claude/edge-handles): the 46 curve.curve_p2 SmCurve::GetNaturalInterval deferrals (IdenticalSolutions of CpGlobalSolver solutions on CacheObject curve handles in ray fires) resolve to the curve the solver's curve tree decomposes: PARTIAL primitive.api_primitives cases=1981 passed=1621 failed=0 deferred=360 max_rel_err=0e0 with_values=1621 no_values=0 vacuous=0 blocked_by=cpp-guard:ub-119(5),query.face_p2(140),surface.trim_srf_cache(105),topology.edgeuse_p3(46),topology.face_p2(64). UPDATE PR #613 after #616/#618: native geometry/trim/ray records cover 2024 cases, 1870 pass bit-identical, 0 fail, 154 deferred (existing C++ guard or unported face/edge callees). Includes 42 scaled/translated examples and the tall translated pyramid regression. Local macOS C9 reference; no fresh full Linux/GCC regression claim. MERGED with main bcc2f80be (stacked PR): 2024 cases, 1907 pass bit-identical, 0 fail, 117 deferred (topology.face_p4 112, cpp-guard:ub-119 5); with main point classification the partial torus now completes. PROMOTION (2026-10-24, post-queue sweep, upstream/main eaa5fc794): fresh cargo run --profile difftest -p difftest --features cpp -- --green --jobs 4: primitive.api_primitives cases=2024 passed=2019 failed=0 deferred=0 skipped_platform=0 rejected=5 max_rel_err=0. The former topology.face_p4 deferrals now compare; create_pyramid calls topology::brep::p8::create_planar_face_with_3d_curves, which calls p7::make_face_with_curves, whose owning-face reads call topology::face::p4::{brep,edges}; topology.face_p4 and topology.brep_p8 are green. UB-119 inputs remain rejected, not deferred. Full macOS sweep: 260 units, 210 passed, 37 partial, 13 failed (unrelated failures; PR remains draft pending a clean canonical gate). UPDATE (PR #831, 2026-10-25, draft WIP): native SmApiCreateBlendPrimitive is now reached by the harness (op 26: the shim builds a box with SmApiCreateBox, resolves edge/face list indices and calls the API; the record is the API status, has, the mutated B-rep record and the blend face's own surface record). 9 fixed cases were added and the generator's last arm now emits blend cases. The WIP does NOT pass: 2 fixed cases pass (invalid association, SM_ERR_INVALID_INPUT 1007 both sides) and 7 fail, exposing two kernel-side blockers recorded in plan/findings.md: (1) valid associations where C++ returns SM_SUCCESS with rpBlendFace == NULL are unrepresentable in Rust, whose create_blend_primitive maps None to NullPointer 1006; (2) adjacent/selected edge pairs make the port's DerivSurfDefinition::sample_values return SM_ERR 1001 while the C++ builds a blend face (669/648 values). Both are outside this PR's scope (shim/ffi/runner only; kernel untouched). Status is unchanged and these cases are not skipped, waived or tolerated; CI cannot be green for this unit until the kernel owners address the two blockers."