sweep.topology_sweep green
- Layer
- 51
- Upstream lines
- 2,456
- Functions
- 51
- Rust module
sweep::topology_sweep
Status history
- todo 2,456 lines
- partial 2,456 lines
- green 2,456 lines
- partial 2,456 lines
- green 2,456 lines
Source: crates/solidcore/src/sweep/topology_sweep.rs
Upstream: source/SMLib/inc/SmSweepGeometryCreation.h, source/SMLib/inc/SmTopologySweep.h, source/SMLib/src/SmSweepGeometryCreation.cpp, source/SMLib/src/SmTopologySweep.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
GREEN 2026-10-27 (HCR silhouette order): Hcr::silhouette_edges hands back newest first, as libstdc++'s unordered_map does, so SetHigher's first image matches C++; nm_box_linear_z_stitch passes (264 values) and nm_test_rotation_neg_y_36 now returns the same SM_ERR as C++; both known mismatches removed (7 cpp_defect cases stay parked). explicit_lists.json (52 cases, all pass with values, from the explicit target lists PR): DoSweep with explicit faces/edges/vertices higher and same lists. local 2026-10-27 (non-manifold mismatch root causes): PARTIAL sweep.topology_sweep cases=688 passed=677 failed=0 deferred=0 rejected=2 known_mismatch=1 parked=8; partial because nm_test_rotation_neg_y_36 is deliberately kept a visible known mismatch (cause is the C++ pointer-keyed silhouette order shown by forced-order probes, ND-492 is evidence, no cpp_defect). Both former known mismatches are the C++ silhouette visiting order (std::unordered_map, ND-2), not a Rust divergence; Rust visits in the C++ HCR insertion order, and C++ forced into that order agrees in every value. nm_box_linear_z_stitch parked ND-491 (C++ SM_ERR 7/1000 heap-varied, 44/1000 shuffled free lists); nm_test_rotation_neg_y_36 known mismatch, not parked, see ND-492 (libstdc++ always visits the first-inserted silhouette last, 5450/5450 SM_ERR in the wire union MakeFaceuse; insertion order succeeds). See plan/findings/sweep.topology_sweep--addendum-2026-10-27-nonmanifold-mismatches-root-cause.md. Earlier: local 2026-10-27 (non-manifold body PR): PARTIAL sweep.topology_sweep cases=636 passed=625 failed=0 deferred=0 rejected=2 known_mismatch=2 parked=7. nonmanifold_body.json (43 cases): whole-B-rep DoSweep of the prog_test my_create_test_brep face, box+wire+shell vertex, lone wire/shell vertex, empty, box alone, face alone, plus faces-higher sweeps of the same bodies, with stitch/merge/repetitions/tagging; record adds wire-edge/shell-vertex counts and face/edge tags. Fixed: SweepAccess::copy_edges default lent the context twice (wire B-rep stayed empty); now p6::copy_edges_with_context. 2 rejected by the FFI guard (UB-269 stale pWireBrep, UB-270 TagProfile on deleted wire edges); 1 parked ND-491 (box alone, stitch); 2 known mismatches keep the unit partial: nm_box_linear_z_stitch (Rust SM_ERR in the box stitch, C++ succeeds 400/400) and nm_test_rotation_neg_y_36 (C++ SM_ERR in the final wire union, Rust succeeds); see plan/findings/sweep.topology_sweep--nonmanifold-body-whole-sweep.md. Earlier: local 2026-10-27: PASS sweep.topology_sweep cases=593 passed=587 failed=0 deferred=0 parked=6 (whole-B-rep DoSweep with stitching/merging: 6 compared, 6 parked as ND-491 heap-layout dependent C++). 51 fns; largest: SmTopologySweep::DoSweep, SmTopologySweep::SweepEdgeHigh, SmTopologySweep::SweepFaceSame, SmSweepStitchCallback::SelectTopologyToKeep; cycle back-edges (call into later units; stub or co-port): blend.hcr(5), boolean.merge_p1(1), boolean.merge_p2(1), boolean.merge_p3(1), boolean.merge_p4(1), boolean.topology_intersector_p1(1), sweep.rotational_sweep_geometry(1), sweep.trans_sweep_geometry(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; CO-PORTED in sweep.rotational_sweep_geometry (PR #126): SmSweepGeometryCreation members m_bMakeAnalytics, m_dEps, constructor, SetMakeAnalytics, SmSweepCheckType -> solidcore::sweep::topology_sweep::{SweepGeometryCreation, SweepCheckType}; PR #222: full sweep control flow, map/callback and base/concrete geometry dispatch ported with statically dispatched SweepAccess service boundary. Difftest 568 cases: 558 passes (exact integer state; emitted f64 values max_rel_err=0), 10 deferred (topology.brep_p3=10), 0 failed/rejected. Compared: four maps including nulls/stale inverses, callback choices, options and edge-profile tags; closure flags, callback f64 distances and successful frame origin/X/Y/Z coordinates are compared. Construction/HCR/copy/merge/stitch tails are present but not C++-compared behind missing dependencies; no production SweepAccess adapter yet (tracked in issue #255). Recursion depth at most 2 (explicit-target wire child); execution limited to 4096 repetitions, no-progress back-face traversal errors, wire ownership cleared after consuming union and cleaned on errors. See plan/findings.md for coverage and safety limitations. Review wiring: available B-rep/shell queries, CopyEdges, MakeFaceWithCurves, CopyFaces and EvaluateBinormal now call their ports. The second review wires MakeShellVertex, MakeVertexLoop (default Opposite), polymorphic-UV MakeEdgeInFace, RemoveFaces, Transform, HasLaminaEdge, Hcr construction/visibility/silhouettes and Stitch::do_stitching with the sweep callback. Merge p3/p4 calls stay behind new_merge (SmMerge::SmMerge, boolean.merge_p2, todo); their canonical engine/storage integration is coordinated with merge_p2, as permitted in review 5589823426. Other SweepAccess stubs do not target green/partial units. Face/edge/vertex tolerance helpers apply the owning kernel zone_tol3d conversion. Explicit borrow-splitting resolvers preserve the actual destination context, persistent notification records/attributes and face identities; adapters retain the complete Hcr session for scene lifetime. Current-main compatibility (e4dd81c4): HCR global visibility receives the owning mutable Kernel; GetShellVertices calls p2 with the actual B-rep and preserves vertex-list order. Four old topology deferrals now compare helper records/maps after shell allocation; new vertex coordinates/full B-rep topology are not exported by the native record. Eight native-feature Rust service regressions separately verify distinct-owner lists, created shell/vertex owner and point, real empty cleanup success, open-loop rejection, downstream blockers and stitch context restoration. Fresh native gates for sweep, p5, p7, p9, p2 and HCR have zero failures; kernel1535/nativeFFI4/wasm/plain+CPP Clippy pass. Full gate and exact-head CI results are recorded in the PR discussion. Shared SweepStitchCallback remains crate-visible for primitive linear caps; PR #233 retains its owner-qualification, conflicting-map and state-restoration regressions. Both borrow callbacks pass caller NotifyEnv and mutable destination Kernel, as required by the primitive adapter. CO-PORTED in primitive.primitive_creation_p1 (PR #213): EntityMaps used by CopyEntityMaps. Transform/delete notifications and retained Hcr sessions use the latest #222 service interface. PR #233 integration with current main e4dd81c4 and #222 compatibility: 568 cases, 558 exact passes, 0 failed, 10 deferred (topology.brep_p3), 0 rejected. Four old construction deferrals now compare helper status/maps after shell allocation; the native record does not certify newly created vertex coordinates or complete B-rep topology. All eight native-feature Rust service regressions pass and separately check created shell/vertex owners and point, the real p2 shell-vertex getter with distinct owners/list order, empty cleanup success, open-loop validation, downstream dependency attribution and stitch flag restoration. All 13 affected native gates pass after this final getter wiring, including topology.brep_p2 (1709/1437 pass/272 deferred). PR #424 adds a caller-borrowed SweepStore with stable identity resolution, persistent attributes/records, mark ownership, partial-output preservation and retained HCR scenes. No additional native geometry coverage is claimed; merge registration and wire construction remain unavailable in this dependency adapter. SweepStore implements SweepAccess and PrimitiveAccess over borrowed or owned resources, with retained MergeState/Relations, caller-qualified notifications and scoped temporary cleanup. The native sweep corpus compares 568/568 cases without deferrals; full solid sweeps remain unqualified. See plan/production-sweep-store.md. PR #1271: whole-B-rep DoSweep (all targets null) compared on real SmApiCreateBox solids in the production SweepStore: 13 whole_* fixtures (stitch/merge off) pass exactly (HCR silhouettes, scene copy, silhouette edge sweep, back-face move; order-canonical record because GetSilhouetteEdges is pointer-hash ordered, ND-2); store RemoveFaces/RemoveAllTopology/stitch no longer lend the context twice. Stitched and merged whole sweeps remain uncompared (plan/findings/sweep.topology_sweep--whole-brep-sweep-store-stitch-and-merge.md). sm_CreateEdgeForBase/make_edge_in_face are dead upstream (pStrutC always NULL).
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
- 703
- 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: curve.curve_p2 green geom.axis2_placement green geom.context green geom.extent1d green geom.object green geom.vector3d green heal.stitch_p1 green topology.brep_p1 green topology.brep_p3 partial topology.brep_p5 green topology.edge green topology.edgeuse_p1 green topology.face_p4 green topology.loopuse green topology.shell green topology.topology green topology.vertex green
Soft dependencies: geom.a_object green geom.attribute green geom.extent3d green geom.tol green heal.stitch_p2 green query.brep green surface.surface_p1 green surface.surface_p2 partial topology.brep_p10 green topology.brep_p2 green topology.brep_p6 green topology.brep_p7 green topology.brep_p9 green topology.edgeuse_p3 green topology.face_p2 partial topology.face_p3 green topology.topology_traverser green topology.vertexuse green
Dependents: primitive.primitive_creation_p3 green sweep.rotational_sweep_geometry green sweep.trans_sweep_geometry green
Soft dependents: none
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmSweepGeometryCreation::SmSweepGeometryCreation | SmSweepGeometryCreation.h:52 | 4 | [SweepGeometryCreation] |
SmSweepGeometryCreation::Copy | SmSweepGeometryCreation.h:59 | 1 | |
SmSweepGeometryCreation::SetMakeAnalytics | SmSweepGeometryCreation.h:61 | 4 | [SweepGeometryCreation::set_make_analytics] |
SmSweepGeometryCreation::VertexSweepHigher | SmSweepGeometryCreation.h:67 | 10 | |
SmSweepGeometryCreation::VertexSweepSame | SmSweepGeometryCreation.h:79 | 9 | |
SmSweepGeometryCreation::EdgeSweepHigher | SmSweepGeometryCreation.h:90 | 22 | |
SmSweepGeometryCreation::EdgeSweepSame | SmSweepGeometryCreation.h:114 | 10 | |
SmSweepGeometryCreation::FaceSweepSame | SmSweepGeometryCreation.h:126 | 10 | |
SmSweepGeometryCreation::IsSweepClosed | SmSweepGeometryCreation.h:159 | 8 | |
SmSweepGeometryCreation::GetStartCoordSystem | SmSweepGeometryCreation.h:168 | 8 | |
SmSweepGeometryCreation::GetSweepTransform | SmSweepGeometryCreation.h:186 | 4 | |
SmTopologySweep::~SmTopologySweep | SmTopologySweep.h:96 | 1 | |
SmTopologySweep::SetDoStitching | SmTopologySweep.h:142 | 1 | |
SmTopologySweep::SetTagging | SmTopologySweep.h:146 | 5 | |
SmTopologySweep::GetMapToSame | SmTopologySweep.h:252 | 1 | |
SmTopologySweep::GetMapToHigher | SmTopologySweep.h:253 | 1 | |
SmTopologySweep::GetMapFromSame | SmTopologySweep.h:254 | 1 | |
SmTopologySweep::GetMapFromLower | SmTopologySweep.h:255 | 1 | |
SmTopologySweep::GetToSamePriv | SmTopologySweep.h:257 | 1 | |
SmTopologySweep::GetFromSamePriv | SmTopologySweep.h:258 | 1 | |
SmTopologySweep::GetToHigherPriv | SmTopologySweep.h:259 | 1 | |
SmTopologySweep::GetFromLowerPriv | SmTopologySweep.h:260 | 1 | |
SmTopologySweep::RemoveFromToSamePriv | SmTopologySweep.h:262 | 1 | |
SmTopologySweep::RemoveFromFromSamePriv | SmTopologySweep.h:263 | 1 | |
SmTopologySweep::GetToSame | SmTopologySweep.h:266 | 1 | |
SmTopologySweep::GetToSame | SmTopologySweep.h:267 | 1 | |
SmTopologySweep::GetToSame | SmTopologySweep.h:268 | 1 | |
SmTopologySweep::GetToHigher | SmTopologySweep.h:276 | 1 | |
SmTopologySweep::GetToHigher | SmTopologySweep.h:277 | 1 | |
SmSweepStitchCallback::SmSweepStitchCallback | SmTopologySweep.h:299 | 2 | |
SmSweepStitchCallback::~SmSweepStitchCallback | SmTopologySweep.h:301 | 1 | |
SmSweepGeometryCreation::~SmSweepGeometryCreation | SmSweepGeometryCreation.cpp:19 | 1 | |
SmTopologySweep::SmTopologySweep | SmTopologySweep.cpp:34 | 20 | [TopologySweep] |
SmTopologySweep::SetRepetitions | SmTopologySweep.cpp:60 | 9 | |
SmTopologySweep::SetHigher | SmTopologySweep.cpp:75 | 28 | [TopologySweep::set_higher] |
SmTopologySweep::SetSame | SmTopologySweep.cpp:110 | 33 | [TopologySweep::set_same] |
SmSweepStitchCallback::SelectTopologyToKeep | SmTopologySweep.cpp:151 | 195 | [TopologySweep::select_topology_to_keep] |
SmTopologySweep::TagProfile | SmTopologySweep.cpp:476 | 74 | |
SmTopologySweep::DoSweep | SmTopologySweep.cpp:601 | 848 | |
SmTopologySweep::DoSweepVerticesSame | SmTopologySweep.cpp:1513 | 24 | |
SmTopologySweep::DoSweepVerticesHigher | SmTopologySweep.cpp:1545 | 100 | |
SmTopologySweep::SweepVertexSame | SmTopologySweep.cpp:1651 | 26 | |
SmTopologySweep::SweepEdgeSame | SmTopologySweep.cpp:1686 | 99 | |
SmTopologySweep::DoSweepEdgesSame | SmTopologySweep.cpp:1792 | 37 | |
sm_CreateEdgeForBase | SmTopologySweep.cpp:1840 | 96 | |
SmTopologySweep::SweepEdgeHigh | SmTopologySweep.cpp:1943 | 399 | |
SmTopologySweep::DoSweepEdgesHigher | SmTopologySweep.cpp:2348 | 59 | |
SmTopologySweep::DoSweepFacesSame | SmTopologySweep.cpp:2414 | 16 | |
sm_MapVertexLoops | SmTopologySweep.cpp:2436 | 58 | |
SmTopologySweep::SweepFaceSame | SmTopologySweep.cpp:2500 | 210 | |
SmTopologySweep::DoSweepFacesHigher | SmTopologySweep.cpp:2716 | 9 |
Module file-header table (8 rows)
| Rust | Upstream |
|---|---|
[SweepGeometryCreation] | SmSweepGeometryCreation (data members) |
[SweepGeometryCreation::new] | SmSweepGeometryCreation(dEps) |
[SweepGeometryCreation::set_make_analytics] | SetMakeAnalytics |
[TopologySweep] | SmTopologySweep |
[TopologySweep::set_same] | SetSame |
[TopologySweep::set_higher] | SetHigher |
[TopologySweep::select_topology_to_keep] | SmSweepStitchCallback::SelectTopologyToKeep |
[SweepCheckType] | SmSweepCheckType |
Upstream tests reaching this unit
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, SM_API_test:TestSmCreateRectangle, SM_API_test:TestSmCreateRegularPolygon