solidcore

Units / topology

topology.brep_p6 green

Layer
45
Upstream lines
1,479
Functions
3
Rust module
topology::brep::p6

Status history

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

Source: crates/solidcore/src/topology/brep/p6.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 (make_faces: the fixture keeps the edge curve owners the build gives, this runner's key_of names, instead of crate::util::own_edge_curves, which gave every edge curve an owner from its edge, unowned ones included): the make_faces cases' previous counts rested on those forced owners; to be re-measured. Rust B-rep: shim-built sources and nets by own_builder, .smb files (upstream and local) by the Rust reader (own_reader::file_in_order, renumbered into the shim walk order); no C++ export on the Rust side. GREEN (PR #694 on #697, 2026-10-24): difftest 595 cases, 595 passed, 0 failed, 0 deferred, max_rel_err=0e0; the 7 region-nesting cases (make_face.json#89..95) match C++ bit for bit, Mark2 counter included: IsInnerShell runs on the B-rep, and IntersectTSBound takes the kept trimmed cache branch with its mark (#697); their known_mismatches entries are removed. main CI e33985411 (2026-10-23): PARTIAL topology.brep_p6 cases=595 passed=586 failed=0 deferred=9 blocked_by=topology.edgeuse_p3(9). PARTIAL, MakeFaceTopology remainder (PR #363): SmBrep::MakeFaceTopology is ported in full, and the mislabelled UNPORTED(topology.face_p3) SetTolerance stop is gone. difftest 587 cases, 521 pass, 0 fail, 66 deferred (intersect.surface_drop_lib_p3 37: DropCurve in CreateUVTrimCurve(s) for trims and radial-sector recovery; topology.brep_p3 18; query.brep 9: CalculateBoundingBox; curve.crv_on_surf 2), max_rel_err 0, no absolute floors. Op 3 (fixtures make_face.json: 89 cases, 50 pass and 39 defer; plus generated cases) runs MakeFaceTopology sequences on kind-5 wire networks. It compares statuses, outputs, mark counters and the whole post-op graph (edge marks excluded, see findings). Downstream: brep_p7 238/78 (was 237/79), boolean.merge_p2 32/13 (was 30/15; MergeContext::SplitMut). With PR #72 merged locally, brep_p8: see the PR description. EARLIER: PARTIAL (PR #169, merged after dependency PR #154): 498 difftest cases, 450 passed, 0 failed, 48 deferred (topology.brep_p2 6: SmBrep::Notify; topology.brep_p1 23: SmBrep::GetInfiniteRegion inside CreateWireEdgeFromCurve, wired to topology.brep_p5 in PR #194, whose copy notifications follow behind a topology.brep_p2 key-routing barrier; topology.face_p3 19: SmFace::SetTolerance), max_rel_err 0, no absolute floors. Of the explicit op-0 cases, 369 return before acquiring a mark (separated mates or lamina); six tiny planes are edgeless and defer after closed traversal at Notify. 56 new open_box sheet cases reach ClosureTraversal and the open return: seeds 0/5 have no lamina edges and mates in the same shell. They compare actual nonzero context increments (MARK +4 per call without a caller lock), lock release, all faceuse marks and shell links over held locks and repeats. Other passing inputs are empty CopyEdges and null-surface MakeFaceTopology. MakeFaceTopology shim always has empty loops/edgeuses/loop-vertices and no explicit region: loop validation and existing-shell branches are not compared; every non-null surface defers at SetTolerance. No nonempty copy, successful face construction or completed split is certified; dependent mutation/classification/cleanup remains deferred. New shell/region identities and shell links use native -3, distinct from null -1. Wired heal.heal_data_p1 using RegionSplitAttempt: only ordinary native status may be ignored, preserving partial outputs; Unported and Rust representation errors propagate. Reused traverser HasLaminaEdge and the latest shell mark-lock API. Sensitivity detects 450/450 perturbations, with zero empty outputs. Four kernel and four native FFI regressions cover status/outputs and prove the open-sheet traversal advances marks. 3 fns; largest: SmBrep::TestClosureSplitRegion, SmBrep::MakeFaceTopology, SmBrep::CopyEdges; cycle back-edges (call into later units; stub or co-port): topology.brep_p1(3), topology.brep_p2(2), topology.brep_p5(2), query.brep(1); unit-SCC #22 (220 units); 196 upstream test entry points reach this unit UPDATE after topology.brep_p2 (PR #149): TestClosureSplitRegion's UNPORTED(topology.brep_p2) SmBrep::Notify is wired: the split API (test_closure_split_region / _attempt) takes the caller's NotifyEnv (signature only) and calls brep::p2::notify with PRE_EDIT and SPLIT_IN_BREP(old, old, new), statuses ignored (SmBrep.cpp:27954-5); the new region gets its default SmTopology record when it is made; the split then stops at UNPORTED(query.brep) SmBrep::CalculateBoundingBox. The runner passes a harness RegionNotifyState. Re-run: 498 cases, 450 pass, 0 fail, 48 deferred (topology.brep_p5 23, topology.face_p3 19, query.brep 6: the 6 former SmBrep::Notify deferrals, relabelled only), --perturb SENSITIVE 450/450. Re-run in PR #149 (review 5578349117 round, merged with main through fb58ea76; topology.brep_p2's UNPORTED stubs wired): 498 cases, 450 pass, 0 fail, 48 deferred; the CopyEdges Notify / SetTolerance sites are wired (the 6 SmBrep::Notify deferrals relabel to query.brep CalculateBoundingBox). UPDATE (PR #535): TestClosureSplitRegion remainder (SmBrep.cpp:27966-28583) ported; the OMITTED stop is gone. difftest 587 cases, 545 pass, 0 fail, 42 deferred (intersect.surface_drop_lib_p3 37, curve.crv_on_surf 2, topology.brep_p1 2, geom.tol 1), max_rel_err 0, no absolute floors. Ray fires read the geometry under the caller's key_of (brep::p2::caller_cache_key). Downstream: brep_p10 1075 pass, 312 deferred (+4 pass); the former split stops in fillet_geom_p4, merge_p2, brep_p7, brep_p8 and heal_data_p3 now defer at geom.tol GetZoneTol3d(const SmObject*), topology.face_p2 or DropCurve. See plan/findings.md. KNOWN MISMATCH (stacked merge of #613 with main): make_face.json#89..95 (7 cases) 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): make_face.json#89..95 now match C++ in geometry and topology; only the Mark2 counter differs (IntersectTSBound's trimmed-cache branch takes a mark the port does not), so they stay known mismatches (findings.md: IsInnerShell classifies on the B-rep itself).

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
595
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: geom.context green geom.object green geom.tol green geom.vector3d green topology.edge green topology.edgeuse_p1 green topology.edgeuse_p2 green topology.edgeuse_p3 green topology.face_p3 green topology.loopuse green topology.proto_topology_p1 green topology.shell green topology.topology green topology.topology_traverser green topology.vertex green

Soft dependencies: geom.extent1d green geom.extent2d green geom.extent3d green intersect.point_class green nurbs.b_spline_curve_p1 green nurbs.b_spline_curve_p2 green surface.surface_p1 green surface.surface_p2 partial topology.face_p1 green topology.vertexuse green

Dependents: none

Soft dependents: boolean.merge_p2 green heal.heal_data_p1 green sweep.topology_sweep green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmBrep::CopyEdgesSmBrep.cpp:185152[copy_edges], [copy_edges_with_context]
SmBrep::MakeFaceTopologySmBrep.cpp:14414688[make_face_topology], [FaceTopologyOptions], [FaceTopology]
SmBrep::TestClosureSplitRegionSmBrep.cpp:28118739[test_closure_split_region]
Module file-header table (8 rows)
RustUpstream
[copy_edges], [copy_edges_with_context]SmBrep::CopyEdges
[make_face_topology], [FaceTopologyOptions], [FaceTopology]SmBrep::MakeFaceTopology
[make_face_topology_attempt], [FaceTopologyAttempt]same, retaining native status and partial outputs
connect_edge_loops, find_sector, assign_uv_curves (private)its mark-locked edge-loop block, radial-sector recovery and cpOptUVCurves block
[test_closure_split_region]SmBrep::TestClosureSplitRegion(SmFaceuse*)
[test_closure_split_region_attempt]same, retaining native status and partial outputs
nest_closed_shells_as_cavities (crate)none: WR-442, the full-turn rotational sweep's opt-in
every_shell_closed (crate)none: its WR-529 test, shared with the stitch's region nesting

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