solidcore

Units / sweep

sweep.api_surfaces green

Layer
59
Upstream lines
390
Functions
9
Rust module
sweep::api_surfaces

Status history

Oct 12Nov 25
  1. todo 381 lines
  2. partial 381 lines
  3. green 381 lines

Source: crates/solidcore/src/sweep/api_surfaces.rs

Upstream: source/SM_API/src/SmApiPrimitives.cpp, source/SM_API/src/SmApiSurfaces.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

2026-10-31 (HANG-5): the FFI's Sweep trajectory guard (check_path_extent, public) now also refuses a curved path (any but a degree-1 NURB) whose control-polygon length exceeds MAX_PATH_EXTENT = 1e8 (the C++ gives no result in 30 s for a quarter-arc path of radius 1e7 and above), keeping the 1e12 bound for all paths, and the runner's Rust side applies the same check (it ran these inputs before); plan/findings/sweep.api_surfaces--curved-sweep-path-above-1e8-hangs-the-cpp.md. Gate unchanged. main CI e33985411 (2026-10-23): PARTIAL sweep.api_surfaces cases=882 passed=879 failed=0 deferred=3 blocked_by=surface.trim_srf_cache(3). partial (PR #37): difftest cases=882 passed=831 deferred=51 (blocked_by primitive.primitive_creation_p2(11), primitive.primitive_creation_p3(40): SmApiCreateSkinPrimitive / SmApiCreateSkinFromFaces / SmApiCreateSurfaceRevolution validate and copy inputs, then stub SmPrimitiveCreation::CreateSkinPrimitive / CreateSkinFromFaces / CreateRotationalSweep); extrude, sweep, ruled and skin bit-identical; 9 fns; largest: SmApiCreateSkinPrimitive, SmApiCreateSurfaceRevolution, SmApiCreateSkin, SmApiCreateSkinFromFaces; entry points: SmApiCreateExtrude, SmApiCreateRuledSurface, SmApiCreateSkin, SmApiCreateSkinFromFaces, SmApiCreateSkinPrimitive, SmApiCreateSurfaceRevolution, SmApiCreateSweep; 15 upstream test entry points reach this unit UPDATE after topology.brep_p3 (PR #204): SmBrep::SmBrep wired to topology::brep::p3::new_brep (create_skin_primitive/create_skin_from_faces take k: &mut Kernel, create_surface_revolution gained the kernel, upstream API context); 882 cases, 831 pass, 0 failed, 51 deferred (topology.shell 51). UPDATE (PR #204, after topology.shell was wired into topology.brep_p3): new_brep completes, so the 51 topology.shell deferrals now stop at SmPrimitiveCreation: 882 cases, 831 pass, 0 failed, 51 deferred (primitive.primitive_creation_p2 11, primitive.primitive_creation_p3 40), case-by-case only the deferral target changed. partial (PR #37): difftest cases=882 passed=831 deferred=51 (blocked_by primitive.primitive_creation_p2(11), topology.brep_p3(40): SmApiCreateSkinPrimitive / SmApiCreateSkinFromFaces / SmApiCreateSurfaceRevolution validate and copy inputs; p3 construction calls await the earlier SmBrep constructor and a concrete PrimitiveAccess adapter (PR #233)); UPDATE 2026-10-23 (claude/face-p1-hooks): the query.face_p1 (SmFace::Point3DClassify) deferral of upstream.json#14 now runs past it and defers at boolean.topology_intersector_p2; cases=882 passed=862 failed=0 deferred=20 (boolean.topology_intersector_p2 17, surface.trim_srf_cache 3) (Mac Studio run; Linux CI is the gate).; Historical E validation before integration with query.face_p1 hooks: Primitive p3 cleanup/owner bridge follow-up (main 54f5865ee): the API now extracts and detaches the actual first surface using PrimitiveModel's notify_ref owner identities, matching native GetSurfaces/SetOwner(NULL). The runner no longer rejects a genuine successful revolution: retains original status/has and compares owner-clear state, natural UV domain and 25 virtual point evaluations/statuses. 882 cases: 879 exact comparable passes, 0 failures, 3 unchanged downstream deferrals (2 face-owned TrimSrfCache, 1 Point3DClassify), down from 20; all 862 old passing case records and native digests unchanged. All 879 comparable native/Rust output digests agree exactly. Original guards, tolerances and negative cases remain unchanged. KNOWN MISMATCH (stacked merge of #613 with main): skin_primitive_annular runs once #613's shell ray face preparation and #639's forwarded face hooks combine, and its region nesting differs from C++; listed in known_mismatches.toml (findings.md: Region nesting once shell ray face preparation meets the forwarded face hooks). UPDATE (IsInnerShell on the B-rep itself): skin_primitive_annular now defers at surface.trim_srf_cache (TrimSrfCache::build_tree_with_face for a face-owned surface); known-mismatch entry removed. UPDATE (CreateFacesFromSurface resets its output): skin_primitive_annular's start cap took a duplicated outer circle because PrimitiveAccess::surface_faces appended where upstream ReSets, so CreateSkinFromFaces re-reported the first layer's faces; fixed, known-mismatch entry removed. 882 cases, 882 pass, 0 deferred: green (findings.md: Skin annular caps: CreateFacesFromSurface resets its output list).

Goldens

This is committed inventory, not a runtime result or a correctness proof. A golden records what solidcore produced when blessed. Current results require the canonical CI gate, not these counts.

Golden records
885
Stored error outcomes
0
Stored deferrals
0
Stored harness rejections
0
Known-failure entries
0

Metadata counts describe fields in the stored records; they are not passes or live failures.

Source at f9704ee3b: golden JSONL · known-failure list.

Dependencies

Depends on: none

Soft dependencies: curve.curve_p2 green geom.context green geom.object green nurbs.b_spline_surface_n_lib_p1 green nurbs.b_spline_surface_n_lib_p2 green nurbs.b_spline_surface_p1 green primitive.primitive_creation_p1 green primitive.primitive_creation_p2 green primitive.primitive_creation_p3 green surface.surface_p1 green topology.brep_p1 green topology.brep_p3 partial topology.brep_p4 green

Dependents: audit.recursion green

Soft dependents: none

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmApiValidateSkinPrimitiveInputsSmApiPrimitives.cpp:7228validate_skin_primitive_inputs (private)
SmApiCopySkinPrimitiveCurvesSmApiPrimitives.cpp:10523copy_skin_primitive_curves (private)
SmApiCreateSkinPrimitiveSmApiPrimitives.cpp:127085[create_skin_primitive], [SkinPrimitive]
SmApiCreateSkinFromFacesSmApiPrimitives.cpp:136148[create_skin_from_faces], [SkinFromFaces]
SmApiCreateExtrudeSmApiSurfaces.cpp:26734[create_extrude]
SmApiCreateSweepSmApiSurfaces.cpp:30836[create_sweep]
SmApiCreateRuledSurfaceSmApiSurfaces.cpp:35134[create_ruled_surface]
SmApiCreateSurfaceRevolutionSmApiSurfaces.cpp:39360[create_surface_revolution]
SmApiCreateSkinSmApiSurfaces.cpp:45942[create_skin]
Module file-header table (11 rows)
RustUpstream
validate_skin_primitive_inputs (private)SmApiValidateSkinPrimitiveInputs (static)
copy_skin_primitive_curves (private)SmApiCopySkinPrimitiveCurves (static)
[create_skin_primitive], [SkinPrimitive]SmApiCreateSkinPrimitive
[create_skin_primitive_with_sources], [SkinSources], [NotTraced](not upstream: #3139)
[create_skin_primitive_with_ends](not upstream: the skin with [SkinEnd]s)
[create_skin_from_faces], [SkinFromFaces]SmApiCreateSkinFromFaces
[create_extrude]SmApiCreateExtrude
[create_sweep]SmApiCreateSweep
[create_ruled_surface]SmApiCreateRuledSurface
[create_surface_revolution]SmApiCreateSurfaceRevolution
[create_skin]SmApiCreateSkin

Upstream tests reaching this unit

SM_API_test:TestSmCreateRuledSurface, SM_API_test:TestSmCreateSkinSurface, SM_API_test:TestSmCreateExtrude, SM_API_test:TestSmCreateSkinFromFaces, SM_API_test:TestSmCreateSkinPrimitive, SM_API_test:TestSmCreateSurfaceRevolution