solidcore

Units / topology

topology.brep_p9 green

Layer
46
Upstream lines
2,484
Functions
6
Rust module
topology::brep::p9

Status history

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

Source: crates/solidcore/src/topology/brep/p9.rs

Upstream: source/SMLib/src/SmBrep.cpp

Port-plan notes

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

2026-11-01 (multi-face OrientSheetSurfaces, fixtures/topology.brep_p9/multi_face_orient.json): 26 op 1 cases on upstream multi-face sheets. 24 are on the not yet oriented Fillet/blade_hub, caps_nside, coons_01_03_29, sphere_dif_box, cap1 and test8 (faces 0 and 1, same and opposite) and run the marked walk over face-use neighbours (SmBrep.cpp:11672-11726). 20 of them make neighbour swaps; cap1 and test8 with same=false swap only the seed face. 2 are on the oriented Fillet/test7 and take the early return; only the opposite case calls SwapUV. PASS topology.brep_p9 cases=710 passed=710 failed=0 deferred=0. With the walk's neighbour swap disabled, exactly the 20 neighbour-swap cases fail. Fillet/open_shell.smb is left out: building its Rust input fails on every op (plan/findings/topology.brep_p9--open-shell-renumber-unreached-vertex.md). 2026-10-30 (owners: the Rust B-rep is built under Conventions::EDGEUSE_GRAPH, whose faces and edges the build owns under the arena identities op 0's BrepQuery::default finds them by, instead of TOPOLOGY_FIXTURE followed by crate::util::own_arena_geometry, which gave every edge curve and face surface an owner from its holder, unowned ones included): the previous counts rested on those forced owners; to be re-measured. 2026-10-30 (.smb file sources: the Rust side now reads the file with the Rust reader, crate::own_builder::read_with under the shim's TOPOLOGY_FIXTURE walk, and runs its own own_setup on it, as it already did for built sources; it no longer imports the shim's post-setup export): the previous GREEN below rested on Rust-side inputs imported from the C++ read and C++ setup for every file case, so those cases compared the C++ B-rep with itself; counts to be re-measured. SmFace handle of a face-owned surface (this PR): the drop_edge_curve projection prefix runs through the face (drop_edge_curve_on_face): PASS topology.brep_p9 cases=684 passed=684 failed=0 deferred=0. main CI e33985411 (2026-10-23): PARTIAL topology.brep_p9 cases=684 passed=683 failed=0 deferred=1 blocked_by=topology.face_p2(1). PR #183 / issue #210 continuation: all six owned SmBrep.cpp bodies are now ported behind individual dependency calls, including region ray selection/retries, sheet orientation, vertex-loop construction, interior splitting, and edge insertion with face/loop redistribution. No OMITTED continuations remain. PARTIAL on source 84ee130c: 613 cases, 505 passed, 108 deferred, 0 failed, max relative error 0; 101 fixed fixtures plus at least 512 generated cases. Blockers: intersect.surface_drop_curve 1, intersect.surface_drop_lib_p3 1, topology.brep_p1 96, topology.brep_p2 3, topology.face_p3 7. Rerun on 6e897f8d after merging PR #117 (offset sm_InsertBreaks back-edge wired): same 613 cases, 505 passed, 108 deferred, 0 failed; perturbation 505/505 detected. On 84ee130c, 4096 seeds: 4197 cases, 3479 passed, 718 deferred, 0 failed. Old c19c0db1 evidence is historical. Active dependency PRs remain independent: p1 owning lists/UV helpers/mutable owner context and arena retirement, p2 notifications/shell topology/sheet predicates/Brep rays, face_p3 notifications/tolerance/loop orientation, face_p4 vertex sectors, query.brep bounding boxes, query.face_p1 3D classification, surface_drop_lib_p3 generic projection. Caller-owned notification storage and curve identities are explicit; Boolean intersector and point-class typed adapters call the real p9 APIs. Opaque classification handles defer specifically to missing mutable B-rep owner context in p1; no p9 algorithm stub remains. Editing state remains an explicit argument until canonical Brep fields from p1/PR #145 land. Arena allocation preserves native order; retirement remains a typed dependency barrier. Native null/odd-EU-pair guards and a no-progress guard for inner-loop transfer bound undefined/nonterminating inputs. The shell retry is a loop with at most one retry. Found and fixed an obsolete InsertManifoldEdgeEnd omission in topology.edge: append both new vertexuses to the target vertex list in native order (previous comment predated vertex-use lists). Owned entrypoints with a compared successful completion: 0/6; no p9 topology mutation is certified. Default passes: 477 split refusals, 10 insertion guards/refusals, 8 point-class edge refusals, 8 vertex updates, 2 projection probes. Op-5 setup loops are C++ imports. Mutation-oracle identity/order, legacy cache and curve/UV geometry coverage still require audit after dependency wiring. 1325 kernel tests, WASM, fmt/direct rustfmt, plain/native strict Clippy and 12 affected runners pass. Runtime runner-package opt-level=0 override required by 8 GiB host memory; kernel-crate/C++ profiles and comparison rules unchanged (see findings for exact commands/limits). Full gate: 204 units, 113 green, 91 partial, 0 failed; status-of p9 partial. 6 fns; cycle back-edges: topology.brep_p2(9), query.brep(1), query.face_p1(1); 200 upstream test entry points reach this unit After merging topology.brep_p1 (#145), its calls are wired (GetRegions/GetEdges/GetFaces, GetInfiniteRegion, sm_SwapFaceUV with SM_MT_NOMARK and ignored statuses, sm_MakeVertexSplitUVTrimCurve, sm_RmAndDel_OldLoopVertices, sm_RedistributeSeamUVTrimCurves); owning lists use part 1's append-at-allocation and deleted loops/loop uses are reset in place. Editing state is Brep::editing_enabled. New callers wired: topology.brep_p7 MakeShellVertex, heal.stitch_p1 MakeVertexSplitEdge. Review follow-ups: real-file fixtures (cone, Mouse, plane_square, plane_circ, box_with_large_fillet) and nonfinite point/tolerance cases (FFI guard removed; no native crash). Rerun on 145e1693: 684 cases, 539 passed, 145 deferred (topology.brep_p2 103, topology.face_p3 39, intersect.surface_drop_curve 1, intersect.surface_drop_lib_p3 1, query.brep 1), 0 failed, max_rel_err 0; perturbation 539/539. Compared successful completions: FindInfiniteRegion only, via its single-region early return (4 cases); no topology mutation is certified (a wire split now runs to its final SmBrep::Notify, topology.brep_p2). Full gate on 7da151aa: 210 units, 113 passed, 97 partial, 0 failed. Batch integration (batch/clean-2026-10-19): set_face_tolerance wired to topology::face::p3::set_tolerance (topology.face_p3). Re-run in PR #149 (review 5578349117 round, merged with main through fb58ea76; topology.brep_p2's UNPORTED stubs wired): 684 cases, 638 pass, 0 fail, 46 deferred (topology.face_p3 39, topology.face_p4 4, query.brep 1, intersect.surface_drop_lib_p3 1, intersect.surface_drop_curve 1); 99 former topology.brep_p2 deferrals pass. The graph export and the runner's id slots now use the C++ shim's walk numbering (boolean_merge_p1::Canon; plan/findings.md). Re-run after wiring stale stubs (PR #285): 684 cases, 669 pass, 0 fail, 15 deferred (SmFace::Notify wired), max_rel_err 0. topology.face_p4 (PR #239) wires FindVertexSector and face_p3's GetUpwardEdgeuses (the POST_EDIT notification), so MakeVertexLoop / MakeEdgeInFaceWithVU run past it: the runner now records MakeEdgeInFaceWithVU's edge / loop / face (it pushed -1s), empties the Rust-only Face::loops / Loop::edges caches (sync_face_cache) as the importer leaves them, and compares the reachable graph (boolean_merge_p1::graph_reachable: deleted loops are reset arena records). 684 cases, 681 pass, 0 failed, 3 deferred (main without this PR: 669/15). UPDATE (PR #526): find_infinite_region takes the B-rep's query::brep::BrepQuery for both its shell and B-rep ray fires (no generic world); called by topology.brep_p5. Report unchanged. CO-PORTED in sweep.topology_sweep: make_vertex_split_edge_with_identity accepts a fallible caller resolver for new split curves; missing registrations return errors rather than synthesized identities. MakeEdgeInFaceWithVU projection (drop_edge_curve_in_face): the DropCurve start point drop no longer classifies fast-drop solutions on the face, as sChange1 (SmSurfaceDropLib.cpp:4315) turns the face cache point testing off for the whole DropCurve; the face cache is still made at the first start drop (follow-up of #1534).

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
710
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.a_object green geom.context green geom.extent1d green geom.extent2d green geom.extent3d green geom.object green geom.tol green geom.vector3d green intersect.point_class green surface.surface_p2 partial topology.brep_p1 green topology.edge green topology.edgeuse_p1 green topology.face_p1 green topology.face_p2 partial topology.face_p3 green topology.loopuse green topology.proto_topology_p1 green topology.shell green topology.topology green topology.vertex green topology.vertexuse green

Soft dependencies: curve.curve_p5 partial geom.axis2_placement green geom.vector2d green intersect.surface_drop_lib_p1 partial intersect.surface_drop_lib_p3 green nurbs.b_spline_curve_p1 green nurbs.b_spline_curve_p2 green surface.surface_p1 green surface.surface_p3 green surface.surface_p5 green topology.edgeuse_p2 green topology.face_p4 green

Dependents: topology.brep_cutting partial topology.brep_p3 partial

Soft dependents: boolean.merge_p1 green boolean.merge_p4 green boolean.topology_intersector_p1 green heal.stitch_p1 green offset.offset_executive_p1 partial sweep.topology_sweep green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmBrep::FindInfiniteRegionSmBrep.cpp:8028579[find_infinite_region]
SmBrep::OrientSheetSurfacesSmBrep.cpp:1164285[orient_sheet_surfaces], [OrientSheetNote]
SmBrep::MakeEdgeInFaceWithVUSmBrep.cpp:124741285[make_edge_in_face_with_vu], [drop_edge_curve]
SmBrep::MakeShellVertexSmBrep.cpp:1933429[make_shell_vertex], [make_shell_vertex_with_kernel_context]
SmBrep::MakeVertexLoopSmBrep.cpp:1937499[make_vertex_loop]
SmBrep::MakeVertexSplitEdgeSmBrep.cpp:21479407[make_vertex_split_edge], [make_vertex_split_edge_with_kernel_context]
Module file-header table (6 rows)
RustUpstream
[find_infinite_region]SmBrep::FindInfiniteRegion
[orient_sheet_surfaces], [OrientSheetNote]SmBrep::OrientSheetSurfaces
[make_shell_vertex], [make_shell_vertex_with_kernel_context]SmBrep::MakeShellVertex
[make_vertex_loop]SmBrep::MakeVertexLoop
[make_vertex_split_edge], [make_vertex_split_edge_with_kernel_context]SmBrep::MakeVertexSplitEdge
[make_edge_in_face_with_vu], [drop_edge_curve]SmBrep::MakeEdgeInFaceWithVU

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