topology.brep_p7 green
- Layer
- 44
- Upstream lines
- 2,503
- Functions
- 6
- Rust module
topology::brep::p7
Status history
- todo 2,503 lines
- partial 2,503 lines
- green 2,503 lines
Source: crates/solidcore/src/topology/brep/p7.rs
Upstream: source/SMLib/src/SmBrep.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
2026-10-30 (nightly fuzz00208, run 41040730716: a copy with repeat 2^32 timed out on the Rust side): the runner's Rust side applies the FFI's checks (solidcore_ffi topology_brep_p7::validate, split out of eval; the B-rep block checked by topology.vertexuse's pure-Rust checks, the arguments against the Rust B-rep's own counts) to the same input as the C++ side, so an input the FFI refuses is a harness error on both sides; regression crates/difftest/tests/fuzz_corpus/topology.brep_p7.json, plan/findings/topology.brep_p7--copy-repeat-2-32-rust-side-runs-past-fuzz-limit-fuzz00208.md. 2026-10-30 (glue, copy and merge_self: the Rust side now makes its B-rep itself, crate::own_builder::build_as for wire, face and network sources and the Rust .smb reader, read_with, for files, renumbered into the shim's walk order under the fixture's conventions with the geometry owned under the runner's own key_of names (the names the operations' B-rep caches look edges and faces up by; under TOPOLOGY_FIXTURE's own keys a glue with region nesting failed with PortInvariant 'edge owner is not in source B-rep'), and resolves the selectors against its own counts; it no longer imports the C++ export): the previous GREEN below rested on Rust-side inputs imported from the C++ build for every glue, copy and non-raw merge_self case, so those cases compared the C++ B-rep with itself; counts to be re-measured. READ GUARD DECIDED BY RUST, MODIFIED STREAMS OUT OF PROCESS (PR #1270, 2026-10-27): the read cases' stream guard is the pure-Rust topology.brep_data simulator (no C++ call) and the C++ SmBrepData read no longer decides the Rust side (the cpp-guard:unvalidated-topology deferral is gone); the C++ read of a modified stream runs in isolate::fresh_process_within (30 s), so a UB-164 crash or hang is rejected and surviving streams are compared. 100 new cases (modified streams the guard accepts and Rust's BrepData::read_from_file reads): 45 geometry-digit overwrites all pass (7 values each); 55 topology-integer overwrites: 25 pass (20 with counts, 5 equal error statuses), 26 rejected (25 C++ crashes, 1 hang: UB-164 addendum 2026-10-27), 4 cpp_defect WR-470 (C++ returns SM_SUCCESS with a B-rep its own ValidatePointers rejects, Rust returns InvalidInput: plan/findings/topology.brep_p7--modified-stream-inconsistent-radial-list.md). Earlier: MergeSelfIntersectionCurves merges through merge_intervals_mut over its B-rep (MergeIntoObject edits it via merge_into_brep): local --unit run PASS cases=348 passed=345 failed=0 deferred=0 rejected=3 (14 deferrals resolved; green). Earlier: UB-165 cases rejected, not deferred (2026-10-24): a MakeFaceWithCurves with a curve on surface, 3D curves and no UV curves past its own input checks crashes upstream (AGENTS.md 5.6): run_cpp returns Output::rejected naming UB-165 from the inputs and the Rust degeneracy tests (the shim's -2 guard stays as a safety net). difftest 348 cases, 289 pass, 0 failed, 56 deferred (intersect.curve_class_p4 26, topology.edge 20, query.face_p2 6, topology.face_p4 4), 3 rejected (the face_curves_cos_no_uv_*_2 reproducers); was 59 deferred (cpp-guard:ub-165 3) (plan/findings.md 'Remaining native-guard cases are rejected, not deferred'). main CI e33985411 (2026-10-23): PARTIAL topology.brep_p7 cases=348 passed=285 failed=0 deferred=63 blocked_by=cpp-guard:ub-165(3),intersect.curve_class_p4(26),query.face_p2(6),topology.edge(20),topology.edgeuse_p3(3),topology.face_p2(1),topology.face_p4(4). PARTIAL (PR #155): difftest 316 cases (built-in: ReadFromFile of the 15 pt_TestFiles B-reps as read and rebuilt, 12 pinned damaged streams the brep_data guard accepts and whose read fails, MakeFaceWithCurves on planes / B-spline patches with square loops (3D, UV, both, curve on surface), an open UV-only curve-on-surface loop, its input errors and the pre-review reproducers, MakeFace null surface / square wire loops (including too small for lines), GlueEdgesGeneral null/same/distinct pairs (including every shared-vertex pair of the files), CopyFaces with and without merge, MergeSelfIntersectionCurves without curves; + 16 generated over all six ops), 197 pass bit-identical (max_rel_err 0, with_values=197 no_values=0), 0 failed, 0 both-errored; every pass is a no-op, an empty input or an error status: 110 glue no-ops (null, identical or wrapped-to-identical edges; the B-rep's counts and sorted edge and vertex tolerances after the op), 64 MergeSelfIntersectionCurves without curves, 23 a status only (12 read errors, 5 face-from-curves input errors, 4 MakeFace null surface, 1 square too small for lines on both sides, 1 generated); 119 deferred (topology.brep_p2 51, surface.cone_p2 24 and topology.face_p2 6 (were topology.brep_p10 30 until PR #130 wired MakeTopologyFromData), topology.brep_p9 19, topology.brep_p1 12, topology.face_p3 1, curve.curve_p6 2 (open curve-on-surface loops on a B-spline patch; the green curve_p6's own documented dropped pOptSurfCrvOnSurf argument, not an unported unit), curve.crv_on_surf 1 (curve on surface over a plane), cpp-guard:ub-165 3: C++ guard, never comparable; the read guard cpp-guard:unvalidated-topology hits no case at the default 16 seeds (14 of 90 generated in the valgrind sweep) and is needed (UB-164, [PSIRT]) and must be revisited when brep_p10 lands); --perturb SENSITIVE 197/197 (reviews of #155: maintainer, cross-model and oursland, all fixed, see findings); --fuzz 2000 FUZZ-PASS (0 crashes/panics/timeouts, 0 differs); valgrind clean (C++ and Rust, >=10 generated programs per op). Every path that builds topology defers. Back-edges wired: topology.brep_p10 (PR #130): ReadFromFile calls MakeTopologyFromData (it now takes &mut Kernel and a p10::TopologyEnv; the runner reads into Brep::new_with_infinite_region) and GlueEdgesGeneral calls TestClosureSplitRegion(edge); trimming_tools (MakeFaceWithCurves); topology.shell wired (IsInnerShell in the GlueEdgesGeneral shell merge, after #154). topology.brep_p6 wired (#169): MakeFace calls MakeFaceTopology (its 1 case, face_curves_cos_no_uv_1_1, now defers at SmFace::SetTolerance, topology.face_p3), GlueEdgesGeneral's region nesting calls TestClosureSplitRegion(faceuse). offset.offset_executive_p1's UNPORTED(topology.brep_p7) MakeFaceWithCurves site now defers at its first argument, GetInfiniteRegion (topology.brep_p1; no case reaches it). boolean.topology_intersector_p1 wired (GlueEdgesGeneral through the new IntersectorBrep::brep_glue_edges_general). topology.brep_p1 wired (follow-up to #155): GetInfiniteRegion reads Brep::infinite_region (the inline m_pInfiniteRegion), the glue's empty-region removal is SmOwningTopology::Remove over brep_p1's region list, followed by m_pInfiniteRegion = m_pList; the runner's new B-reps own a void infinite region, as new SmBrep() (Brep::new_with_infinite_region). The 12 GetInfiniteRegion deferrals now defer at the next unported call (see the 2026-10-19 rerun below). Gaps in other units' ports: curve.curve_p6 DeformToEndPointTargets has no pOptSurfCrvOnSurf (a curve on surface with a gap target defers to curve.curve_p6), curve.crv_on_surf non-B-spline surfaces defer to curve.crv_on_surf. Was: 6 fns; largest: SmBrep::MakeFaceWithCurves, SmBrep::GlueEdgesGeneral, SmBrep::MakeFace, SmBrep::ReadFromFile; entry points: SmBrep::ReadFromFile; cycle back-edges (call into later units; stub or co-port): topology.brep_p1(5), topology.brep_p2(4), topology.face_p3(4), boolean.merge_p2(2), topology.brep_p3(2), topology.brep_p6(2), topology.topology_traverser(2), query.face_p2(1), topology.brep_p4(1), topology.brep_p5(1), topology.brep_p9(1); unit-SCC #22 (220 units); 196 upstream test entry points reach this unit PR #183 (topology.brep_p9) wires MakeShellVertex: make_face_with_curves, copy_faces and trimming_tools' face builder take a NotifyEnv for its notifications; the runner's square-loop MakeFace now runs MakeShellVertex instead of hard-coding the p9 deferral. Rerun on 145e1693: 316 cases, 197 passed, 119 deferred (topology.brep_p2 70, topology.brep_p10 30, topology.brep_p1 12, cpp-guard:ub-165 3, curve.curve_p6 2, curve.crv_on_surf 1, topology.face_p3 1), 0 failed; the 5 former topology.brep_p9 deferrals stop at MakeShellVertexTopology (topology.brep_p2). UPDATE (2026-10-19): after #153 the surface.cone_p2 24 deferrals are surface.sphere 20 and surface.surface_p2 4. Rerun after merging batch #259 (2026-10-19, PR #246): 316 cases, 197 passed, 0 failed, 119 deferred (topology.brep_p2 81, surface.sphere 20, topology.face_p2 6, surface.surface_p2 4, cpp-guard:ub-165 3, curve.curve_p6 2, curve.crv_on_surf 2, topology.face_p3 1); the 12 former GetInfiniteRegion deferrals stop at MakeShellVertexTopology (topology.brep_p2, 11, through topology.brep_p9 MakeShellVertex) and curve.crv_on_surf (face_curves_7). Known back-edge: MergeSelfIntersectionCurves' 2 UNPORTED(intersect.curve_class_p4) stubs (classify_on_faces, set_curve_and_merge) stay for a separate follow-up with runner cases that drive curves through them (no case reaches them today). UPDATE after topology.brep_p2 (PR #149 follow-up): the 4 UNPORTED(topology.brep_p2) stubs are wired: SmBrep::Notify (GlueEdgesGeneral's PRE_EDIT and MERGE_IN_BREP, through the caller's NotifyEnv, statuses ignored as SmBrep.cpp:9840/9854), SetTolerance (CopyFaces, SmBrep.cpp:2014), sm_CheckAndFixUVTrimCurves and RebuildUVTrimCurves (ReadFromFile); TestClosureSplitRegion (edge version) takes the NotifyEnv. 316 cases, 197 pass, 0 fail, 119 deferred; the 51 former topology.brep_p2 deferrals now defer on topology.face_p3 SmFace::Notify (43), topology.brep_p1 GetInfiniteRegion (7) and topology.brep_p4 DeleteEdge (1). Unit tests glue_no_ops / read_errors_and_deferral updated to the newly reachable results (bare edges: the missing primary edge use; an empty file reads). Re-run in PR #149 (review 5578349117 round, merged with main through fb58ea76; topology.brep_p2's UNPORTED stubs wired): 316 cases, 232 pass, 0 fail, 84 deferred; 35 SmBrep::Notify deferrals now pass (16-52 values), the rest relabel (topology.brep_p3 MakeWireEdgeVertex 19, topology.brep_p1 GetInfiniteRegion 13, topology.brep_p4 DeleteEdge 1, query.brep 2). Re-run in PR #149 (merge with main through 39ceb995, #283): 316 cases, 237 pass, 0 fail, 79 deferred (topology.brep_p3 30, surface.sphere 20, topology.face_p2 6, surface.surface_p2 4, boolean.merge_p2 3, cpp-guard:ub-165 3, topology.face_p4 3, curve.crv_on_surf 2, curve.curve_p6 2, query.brep 2, topology.brep_p9 2, topology.brep_p4 1, topology.face_p3 1): with #246's topology.brep_p1 wiring, of main's 81 topology.brep_p2 deferrals 40 pass (SmBrep::Notify 39, SetTolerance 1) and the rest relabel (MakeWireEdgeVertex 30 and others).; boolean.merge_p2 (PR #229) wired CopyFaces' merge branch (MergeState::with_breps, then MakeFaceuse per face with DoingBoolean set; copy_faces now takes &mut Kernel); unreached behind SmFace::GetBrep (topology.face_p4): main's 3 boolean.merge_p2 deferrals now stop there (316 cases, 237 pass, 0 fail, 79 deferred) 2026-10-21 back-edge wired: heal.stitch_p1's SmBrep::GlueEdgesGeneral wrapper now calls glue_edges_general (PR #317; its three call sites in heal::stitch::p1/p2). UPDATE (PR #204, topology.brep_p3): the UNPORTED(topology.brep_p3) MakeWireEdge / MakeWireEdgeVertex stubs are wired to topology::brep::p3::make_wire_edge(_vertex), notifying through the kernel context's callbacks (brep::p3::with_kernel_callbacks) under brep::p3::default_key_of identities; make_face_with_curves and copy_faces take &mut Kernel. UPDATE (PR #204, Codex re-check of d61f8d48): the wire edges notify under the kernel's identities (brep::p3::with_kernel_callbacks lends the kernel context's callbacks with their identity domain; brep::p3::default_key_of is removed). Report unchanged. UPDATE (PR #204, overseer ruling on the 9129d9f2 reviews): brep::p3::with_kernel_callbacks (the wire edges) refuses a nested call before anything changes; behaviour otherwise unchanged. Report unchanged. UPDATE (PR #204, #149 da779c51 merge): MakeWireEdge / MakeWireEdgeVertex notify through the caller's NotifyEnv (#149 threads it through make_face_with_curves / copy_faces) instead of with_kernel_callbacks. The runner's MakeFace square-loop op builds the shim's loop in Rust (brep::p3::new_brep, p9 MakeShellVertex, three p3 MakeWireEdgeVertex, MakeWireEdge, each edge's SAME edge use) instead of deferring on topology.brep_p3. After merging #149 167dd352 (main through 39ceb995): 316 cases, 240 pass, 0 fail, 76 deferred; case by case against #149's report: 3 deferred -> pass, the other 27 topology.brep_p3 deferrals relabel (curve.curve_p2 SmCurve::GetOwner 22, topology.face_p3 SmFace::SetTolerance 5), no other outcome change. Re-run in PR #204 (e326597e): 240 pass, 0 fail, 76 deferred; 3 deferred -> pass, 27 topology.brep_p3 deferrals relabel (curve.curve_p2 22, topology.face_p3 5). UPDATE (PR #204 main merge, 2026-10-21): 316 cases, 247 pass, 0 fail, 69 deferred (was 238 / 78). API EXTENDED in sweep.topology_sweep (PR #222): make_face_with_curve_owners exposes each input curve slot owner, including None for discarded curves and completed slots before errors; make_face_with_curves retains its existing API and behavior. PR #233 synchronization with main 4db3d660: the owner-output wrapper forwards the caller NotifyEnv, matching main's MakeShellVertex notifications. UPDATE (PR #526, FindAndSetInfiniteRegion wired): 316 cases, 271 pass, 0 fail, 45 deferred (the 2 FindInfiniteRegion deferrals pass). SweepStore CopyFaces accepts distinct source keys/context and retained canonical mate maps; construction uses the mutable destination kernel. UPDATE (2026-10-20, curve_class follow-up PR): wired: classify_on_faces calls intersect.curve_class_p4's constructor (CurveClassification::with_curve) and query.face_p2's curve_on_classify, set_curve_and_merge calls intersect.curve_class_p1's set_curve and intersect.curve_class_p5's merge_intervals, over topology.face_p3's IntersectObject handles. OPTIONAL-SURFACE ENDPOINT FOLLOW-UP: 326 cases, 281 pass, 0 fail, 45 deferred, max_rel_err = 0. Against the exact main 3e811d0c7 artifact, face_curves_cos_open_loop is the only existing outcome change: deferred to pass (10 values). No existing cases were removed. Ten added plane/B-spline gap fixtures cover scales 0.1/1/10 and both face orientations: 3 pass, 7 deferred at SmSurface::DropCurve (intersect.surface_drop_lib_p3). MakeFaceWithCurves passes its actual surface to UV endpoint deformation, removing the dropped-argument curve.curve_p6 deferral. UPDATE (endpoint refresh against main 8c1eaa572, 2026-10-23): 348 cases, 281 pass, 0 fail, 67 deferred, max_rel_err = 0. The exact-main CI run 39909383159 audit retains all 338 existing cases. Only face_curves_cos_open_loop changes outcome (deferred to pass, 10 values); gen0008 advances to SmCurveClassification::ReSet without a comparison gain. The ten added fixtures now give 7 pass and 3 deferred (B-spline opposite faces reach curve_class_p2 ReSet). DropCurve in #463 unlocks the downstream paths. No other meaningful existing-case report fields change.
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
- 462
- 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.extent1d green geom.object green geom.tol green geom.vector3d green intersect.curve_class_p1 green nurbs.b_spline_curve_p1 green surface.surface_p1 green surface.surface_p2 partial topology.brep_p10 green topology.edge green topology.edgeuse_p1 green topology.face_p2 partial topology.proto_topology_p1 green topology.shell green topology.topology green
Soft dependencies: curve.crv_on_surf green curve.curve_p4 green curve.curve_p6 green geom.context green geom.extent2d green geom.tools green intersect.curve_class_p4 green intersect.curve_class_p5 green intersect.point_class green surface.surface_p11 green topology.brep_data green topology.edgeuse_p2 green topology.face_p4 green topology.vertexuse green
Dependents: blend.feature_executive blocked topology.api_files partial topology.brep_local_operation partial
Soft dependents: blend.fillet_corner_p1 green blend.fillet_geom_p4 partial blend.fillet_removal green boolean.merge_p2 green boolean.merge_p3 green boolean.merge_p4 green boolean.topology_intersector_p1 green boolean.topology_intersector_p2 green heal.stitch_p1 green heal.stitch_p2 green offset.offset_executive_p1 partial offset.offset_executive_p2 partial primitive.primitive_creation_p1 green primitive.primitive_creation_p2 green sweep.topology_sweep green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmBrep::CopyFaces | SmBrep.cpp:1999 | 204 | [copy_faces], [copy_faces_with_merge] |
SmBrep::GlueEdgesGeneral | SmBrep.cpp:9829 | 684 | [glue_edges_general] |
SmBrep::MakeFaceWithCurves | SmBrep.cpp:15972 | 1039 | [make_face_with_curves], [make_face_with_curves_with_kernel_context], [make_face_with_curve_owners], [FaceCurvesInput] |
SmBrep::MakeFace | SmBrep.cpp:19061 | 257 | [make_face], [MakeFaceOptions], [NewFace] |
SmBrep::MergeSelfIntersectionCurves | SmBrep.cpp:22974 | 92 | [merge_self_intersection_curves], [SelfIntersectionCurve] |
SmBrep::ReadFromFile | SmBrep.cpp:32255 | 227 | [read_from_file] |
Module file-header table (8 rows)
| Rust | Upstream |
|---|---|
[read_from_file] | SmBrep::ReadFromFile |
[read_from_data] | SmBrep::ReadFromFile after the file is read |
[make_face], [MakeFaceOptions], [NewFace] | SmBrep::MakeFace |
[make_face_with_curves], [make_face_with_curves_with_kernel_context], [make_face_with_curve_owners], [FaceCurvesInput] | SmBrep::MakeFaceWithCurves |
[glue_edges_general] | SmBrep::GlueEdgesGeneral |
[copy_faces], [copy_faces_with_merge] | SmBrep::CopyFaces |
[unstitch] | SmBrep::UnStitch (the fork's, returning its status) |
[merge_self_intersection_curves], [SelfIntersectionCurve] | SmBrep::MergeSelfIntersectionCurves |
Upstream tests reaching this unit
prog_test:my_test_tsurf_cyl_creation_2d, prog_test:my_test_tsurf_cyl_creation_3d, prog_test:my_test_tsurf_cyl_creation_fast, prog_test:my_test_tsurf_creation, SM_API_test:TestSmCreatePlanarCircle, SM_API_test:TestIntersectionOutputStatus