sweep.api_brep partial
- Layer
- 59
- Upstream lines
- 529
- Functions
- 12
- Rust module
sweep::api_brep
Status history
- todo 529 lines
- partial 529 lines
- green 529 lines
- partial 529 lines
Source: crates/solidcore/src/sweep/api_brep.rs
Upstream: source/SM_API/src/SmApiBrep.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
[2026-11-05 (#2890 follow-on): PARTIAL, 3 known mismatches: #2890's precise properties move three volumes within their accuracy, solidcore closer to an independent reference than the C++ (box_face1_curve_path_cap 7.6e-13 vs -1.51e-8; the whole spheres 5.42e-9 vs 3.46e-7 / 1.10e-7 at 1e-6, and at 1e-8 5.52e-11 where the C++ returns SM_ERR; plan/findings/sweep.api_brep--precise-properties-2890-moves-cases-2026-11-05.md)] 2026-10-31 (nightly fuzz run 41040730716, fuzz00293: a curve sweep along a path with a 1e300 point never returns in the C++, HANG-43, located in the HANG-5 path polyline of N_CreateSweepScale): the FFI refuses a curve-sweep path other than a line segment whose extent exceeds MAX_PATH_EXTENT = 1e8 (check_path_extent) and the runner's Rust side applies the same check, so the case is a harness error on both sides; the corpus cases fuzz01218/fuzz01458 (HANG-43) now run the C++ side and expect that refusal; plan/findings/sweep.api_brep--nightly-fuzz00293-curve-sweep-huge-path-hangs-the-cpp.md. Gate unchanged (694 passed). 2026-10-29 (SM_API 1.0.1 parity, batch 1): adds SmApiNonManifoldSweep (non_manifold_sweep), SmApiNonManifoldRotationalSweep (non_manifold_rotational_sweep) and smApiSweepSelectionIsOwnedBy (private), with pRegionBrep as region: Option<RegionBrep> (Other is SM_ERR_INVALID_INPUT, SmApiBrep.cpp:1822 / :1881). Their difftest cases run in the boolean.api_brep runner (its operand builders and B-rep record), sweep / rotational_sweep calls. 2026-10-25 (wire: faces_to_delete LiveBrepObjects world): GREEN sweep.api_brep cases=573 passed=573 failed=0 deferred=0 max_rel_err=0e0 with_values=573 no_values=0 vacuous=0 (--perturb 573/573); ProjectAndTrim's faces_to_delete runs over LiveBrepObjects so TrimSrfCache builds with the owning face handle. 2026-10-24 (wire: SmMerge::SmMerge and SmBrep::ProjectAndTrim in the primitive model): PARTIAL sweep.api_brep cases=573 passed=572 failed=0 deferred=1 blocked_by=surface.trim_srf_cache(1) (main: passed=564 deferred=9, boolean.merge_p2 8, topology.brep_p10 1); the 8 draft/taper merge cases pass, the ProjectAndTrim case defers inside CreateParallelProjectionCurves (TrimSrfCache without a face handle). gen0284 (a taper through the merges) takes about 150 s on each side. main CI e33985411 (2026-10-23): PARTIAL sweep.api_brep cases=573 passed=514 failed=0 deferred=59 blocked_by=boolean.merge_p2(8),surface.trim_srf_cache(45),topology.edgeuse_p3(6). partial (PR #110): difftest cases=573 passed=306 deferred=267 (blocked_by primitive.primitive_creation_p2(80), primitive.primitive_creation_p3(187): every entry point validates and copies its inputs as upstream, then stubs the SmPrimitiveCreation sweep it wraps); compared: NULL curves, curves without Copy (SM_ERR), empty inputs, missing path, non-positive pipe radius, cap selector range; FFI fences off UB-111, UB-112, UB-113, UB-114, HANG-13; 12 fns; largest: SmApiCreateDraftSweep, SmApiCreateLinearSweep, SmApiCreateCurveSweep, SmApiCreateCurveSweepFromEdges; entry points: SmApiCreateCurveSweep, SmApiCreateCurveSweepFromEdges, SmApiCreateCurveSweepFromFaces, SmApiCreateDraftSweep, SmApiCreateLinearSweep, SmApiCreateLinearSweepWithRepetitions, SmApiCreatePipeSweep, SmApiCreateRotationalSweep, SmApiCreateRotationalSweepWithRepetitions, SmApiCreateSweepAlongPlanarPath, SmApiCreateTaperExtrude; 15 upstream test entry points reach this unit UPDATE after topology.brep_p3 (PR #204): the SmBrep::SmBrep stubs are wired to topology::brep::p3::new_brep (entry points take k: &mut Kernel; the constructor writes the context size estimate), which stops at SmRegion::SetIsVoid (topology.shell): 573 cases, 306 pass, 0 failed, 267 deferred (topology.shell 256, primitive.primitive_creation_p2 11). UPDATE (PR #204, after topology.shell was wired into topology.brep_p3): new_brep completes (SetIsVoid), so the 256 topology.shell deferrals now stop at the SmPrimitiveCreation sweep each entry point wraps: 573 cases, 306 pass, 0 failed, 267 deferred (primitive.primitive_creation_p2 80, primitive.primitive_creation_p3 187), case-by-case only the deferral target changed. partial (PR #110): difftest cases=573 passed=306 deferred=267 (blocked_by primitive.primitive_creation_p2(80), topology.brep_p3(187): every entry point validates and copies its inputs as upstream; p3 sweep calls await the earlier SmBrep constructor and a concrete PrimitiveAccess adapter (PR #233)); UPDATE 2026-10-23 (branch claude/edge-handles): the 5 curve.curve_p2 GetNaturalInterval deferrals resolve (curve-solver ParameterDomains): PARTIAL sweep.api_brep cases=573 passed=503 failed=0 deferred=70 max_rel_err=0e0 with_values=503 no_values=0 vacuous=0 blocked_by=boolean.merge_p2(8),boolean.topology_intersector_p2(2),query.face_p2(15),surface.trim_srf_cache(40),topology.brep_p3(1),topology.edgeuse_p3(4).
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
- 696
- 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: primitive.primitive_creation_p2 green primitive.primitive_creation_p3 green
Soft dependencies: curve.curve_p2 green geom.context green geom.object green geom.vector3d green primitive.primitive_creation_p1 green topology.brep_p1 green topology.brep_p3 partial topology.brep_p4 green
Dependents: audit.recursion green
Soft dependents: none
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmApiCopyCurvesForConsumingSweep | SmApiBrep.cpp:92 | 31 | copy_curves_for_consuming_sweep (private) |
SmApiCreateLinearSweep | SmApiBrep.cpp:1196 | 50 | [create_linear_sweep] |
SmApiCreateRotationalSweep | SmApiBrep.cpp:1254 | 48 | [create_rotational_sweep] |
SmApiCreateDraftSweep | SmApiBrep.cpp:1310 | 59 | [create_draft_sweep] |
SmApiCreatePipeSweep | SmApiBrep.cpp:1376 | 34 | [create_pipe_sweep] |
SmApiCreateSweepAlongPlanarPath | SmApiBrep.cpp:1420 | 48 | [create_sweep_along_planar_path] |
SmApiCreateCurveSweep | SmApiBrep.cpp:1475 | 49 | [create_curve_sweep], [CurveSweep] |
SmApiCreateCurveSweepFromFaces | SmApiBrep.cpp:1530 | 49 | [create_curve_sweep_from_faces] |
SmApiCreateCurveSweepFromEdges | SmApiBrep.cpp:1585 | 49 | [create_curve_sweep_from_edges] |
SmApiCreateTaperExtrude | SmApiBrep.cpp:1640 | 39 | [create_taper_extrude] |
SmApiCreateLinearSweepWithRepetitions | SmApiBrep.cpp:1685 | 36 | [create_linear_sweep_with_repetitions] |
SmApiCreateRotationalSweepWithRepetitions | SmApiBrep.cpp:1727 | 37 | [create_rotational_sweep_with_repetitions] |
Module file-header table (17 rows)
| Rust | Upstream |
|---|---|
copy_curves_for_consuming_sweep (private) | SmApiCopyCurvesForConsumingSweep (static) |
[create_linear_sweep] | SmApiCreateLinearSweep |
[create_rotational_sweep] | SmApiCreateRotationalSweep |
[create_draft_sweep] | SmApiCreateDraftSweep |
[create_pipe_sweep] | SmApiCreatePipeSweep |
[create_sweep_along_planar_path] | SmApiCreateSweepAlongPlanarPath |
[create_curve_sweep], [CurveSweep] | SmApiCreateCurveSweep |
[create_curve_sweep_with_placements], [PlacedCurveSweep] | SmApiCreateCurveSweep with the SolidCraft fork's pOptPlacements |
[create_curve_sweep_from_faces] | SmApiCreateCurveSweepFromFaces |
[create_curve_sweep_from_edges] | SmApiCreateCurveSweepFromEdges |
[create_taper_extrude] | SmApiCreateTaperExtrude |
[create_taper_extrude_with_corner], [TaperExtrude] | SmApiCreateTaperExtrude (fork: eCorner, pOptRefusal, pOptRefusedCorner) |
[create_linear_sweep_with_repetitions] | SmApiCreateLinearSweepWithRepetitions |
[create_rotational_sweep_with_repetitions] | SmApiCreateRotationalSweepWithRepetitions |
selection_is_owned_by (private) | smApiSweepSelectionIsOwnedBy (static template) |
[non_manifold_sweep], [SweepSelection], [RegionBrep] | SmApiNonManifoldSweep |
[non_manifold_rotational_sweep] | SmApiNonManifoldRotationalSweep |
Upstream tests reaching this unit
SM_API_test:TestSmCurveSweep, SM_API_test:TestSmPipeSweep, SM_API_test:TestSmCurveSweepFromFaces, SM_API_test:TestSmCurveSweepFailureCleanup, SM_API_test:TestSmCreateDraftSweep, SM_API_test:TestSmTaperExtrude