solidcore

Units / topology

topology.loopuse green

Layer
39
Upstream lines
958
Functions
49
Rust module
topology::loopuse

Status history

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

Source: crates/solidcore/src/topology/loopuse.rs

Upstream: source/SMLib/inc/SmLoop.h, source/SMLib/inc/SmLoopuse.h, source/SMLib/src/SmLoop.cpp, source/SMLib/src/SmLoopuse.cpp

Port-plan notes

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

2026-10-31 (2026-10-20 fuzz sweep fuzz00839: a B-rep block with a -1e300 surface control point never returns in the C++ graph export, HANG-29): the FFI's new export() (which the runner's graph_of now uses) and eval refuse block values above topology_edgeuse_p2::MAX_BLOCK_MAGNITUDE = 1e150 before the native export, and the runner's Rust side applies the same check; plan/findings/topology.loopuse--fuzz00839-huge-net-hangs-the-cpp-export.md. Gate unchanged. Rust B-rep: shim-built sources by own_builder, .smb files by the Rust reader (own_reader::brep_in_order, renumbered into the shim walk order); no C++ export on the Rust side. #1419 WP2 (PR #1472): SmLoopuse::IsLoopuseSideInSurface -> topology::loopuse::is_loopuse_side_in_surface; difftest 9013 cases, 9013 passed, 0 deferred (159 new level0 cases over every loop use, three periodic-flag variants). #700 stack (opt-in Kernel::fixes.topology_failed_evaluations_propagate, WR-262, default off = SMLib): default difftest unchanged; with the fix on, GetUVCornerBoundaries propagates failed evaluations and drops. Exact SmSurfOfRevolution/SmSphere/SmTorus face export (#304, #436); counts in reports/difftest/topology.loopuse.json. PARTIAL: difftest 8854 cases (8238 fixture: 4712 review adversarial (fixtures/topology.loopuse/review_adversarial.json: every op on loop indices 0..23 of each B-rep, a deterministic subset of a 78120-case sweep that passed once), 1984 tolerance-limit IsClosed3d cases (every edge tolerance 0, 1e-15, -1e-12 or 1e-9, so gaps exceed XSectTol3d: the over-tolerance branch runs 176 times, 88 with bCheckAllGaps FALSE), 1110 on the 15 upstream .smb B-reps read by SmBrep::ReadFromFile, with and without RebuildUVTrimCurves, plus 432 on the prog_test my_test_topology wire network, wire edges and the plane / B-spline faces of topology.edgeuse_p2 incl. tiny, huge, pinched and sub-domain ones; 16 generated + 600 generated in code; 4000 more checked once), 7950 pass bit-identical, 0 failed, 904 deferred (topology.face_p3 366: SmFace::Notify around FlipLoopOrientation of every loop on a face; topology.edgeuse_p3 348: GetOrCreateUVTrimCurve in GetUVCornerBoundaries / the sector computations of IsMissingSeamAtVertices; inexact .smb geometry 190: topology.brep_p10 87, surface.sphere 45, surface.surf_of_extrusion_p2 33, surface.cone_p1 25), max_rel_err 0; --perturb SENSITIVE. Loopuse gains orientation (m_eOrientation); the shared B-rep export (sc_edgeuse_graph.h and the topology.vertexuse / topology.face_p2 / query.edge shim copies) and their importers carry it; the loopuse shim adds each face m_pFU (FaceFu op). Upstream bug WR-93: IsClosed3d never reports a loop open (ported as is). Wired: SmVertex::IsConnectedTo / SmEdge::IsConnectedTo -> topology::vertex / topology::edge is_connected_to (merge of main; the 99 vertex/edge-target cases now run on both sides); topology.edgeuse_p1 co-ports loopuse_edgeuses / loopuse_shell, topology.face_p2 loopuse_vertexuses, query.loop calc_quad_num and topology.vertexuse SmLoopuse::GetOrientation now call topology::loopuse (their difftests unchanged); UNPORTED(topology.loopuse) in intersect::point_class and surface::trim_srf_cache not wired (opaque handles without a Brep; plan/findings.md). Plan notes: 48 fns; largest: SmLoopuse::IsClosed3d, SmLoop::GetUVCornerBoundaries, SmLoop::FlipLoopOrientation, SmLoopuse::IsMissingSeamAtVertices; cycle back-edges (call into later units; stub or co-port): topology.edge(6), topology.edgeuse_p3(1), topology.face_p3(1); unit-SCC #22 (220 units); 319 upstream test entry points reach this unit; CO-PORTED in topology.edgeuse_p1 (PR #55): SmLoopuse members (owner face use, m_pL, m_pLUMate, m_tLoopuseType/m_pEUorVU) -> topology::{Loopuse, LoopuseStart}, SmLoop::m_pLU -> topology::Loop::loopuse; SmLoopuse::GetEdgeuses (no filters), GetShell -> topology::edgeuse::p1::{loopuse_edgeuses, loopuse_shell}; CO-PORTED in query.loop (PR #63): SmLoop::GetUVCornerBoundaries, sm_CalcQuadNum -> topology::loopuse::uv_corner_boundaries (query::r#loop::contains_uv_point now walks the arena topology and calls it, PR #117); CO-PORTED in topology.face_p2 (PR #91): SmLoopuse::GetVertexuses without filter -> private topology::face::p2::loopuse_vertexuses; CO-PORTED in topology.vertex (PR #96): SmLoopuse::GetVertices(SmTArray&) (no attribute filter), SmLoop::GetVertices -> topology::vertex::{loopuse_vertices, loop_vertices}; CO-PORTED in topology.edge (PR #103): SmLoopuse::GetEdges(SmTArray&) without attribute filter -> private topology::edge::loopuse_edges [topology.edgeuse_p3 wired (PR #117): 8854 cases, 8250 pass, 0 failed, 604 deferred (intersect.surface_drop_lib_p3 48, surface.cone_p1 25, surface.sphere 45, surface.surf_of_extrusion_p2 33, topology.brep_p10 87, topology.face_p3 366)] [topology.face_p3 wired (PR #139, SmFace::Notify around FlipLoopOrientation): 8854 cases, 8250 pass, 0 failed, 604 deferred; the 366 topology.face_p3 deferrals now defer at the POST_EDIT notification's SmFace::GetUpwardEdgeuses (topology.face_p4 366)] [generated cases draw a B-rep with the loopuse or loop the op selects (PR #340, #294 row 6): 8854 cases, 8259 pass (7995 comparing values; the 264 both refusing are the wire and network fixtures), 0 failed, 595 deferred (topology.face_p4 360, topology.brep_p10 87, surface.surface_p2 69, intersect.surface_drop_lib_p3 46, surface.surf_of_extrusion_p2 33)] UPDATE (PR #204, topology.brep_p3): entity_of_notify_key is #[cfg(test)] (its one production user, heal_data_p3's capture_changes, now decodes kernel identities); notify_ref is unchanged. GREEN (promoted by intersect.surface_drop_lib_p3, PR #463): CI difftest 8854 cases, 8854 pass, 0 deferred, 0 failed (the 46 cases deferred on SmSurface::DropCurve now compare).

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
9,013
Stored error outcomes
264
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.a_object green geom.extent1d green geom.object green geom.tol green geom.vector3d green topology.edgeuse_p1 green topology.face_p2 partial topology.topology green topology.vertexuse green

Soft dependencies: curve.curve_p2 green geom.extent2d green geom.vector2d green nurbs.b_spline_curve_p1 green surface.surface_p2 partial surface.surface_p5 green surface.surface_p7 green topology.proto_topology_p1 green topology.shell green topology.vertex green

Dependents: blend.feature_executive blocked blend.identify_fillet green boolean.merge_p2 green heal.face_props green heal.heal_data_p3 green query.face_p3 green query.face_p4 green query.loop green sweep.topology_sweep green topology.brep_constructor green topology.brep_p1 green topology.brep_p3 partial topology.brep_p4 green topology.brep_p6 green topology.brep_p8 green topology.brep_p9 green topology.brep_validation green topology.face_p1 green topology.face_p3 green topology.face_p4 green topology.trimming_tools green

Soft dependents: blend.fillet_geom_p6 green blend.fillet_solver_p1 green blend.fillet_solver_p3 green blend.fillet_standard_solver_p1 green blend.fillet_standard_solver_p2 green blend.hcr green boolean.topology_intersector_p3 green query.api_queries green topology.brep_p10 green topology.edge green topology.topology_traverser green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmLoop::SmLoopSmLoop.h:503[crate::topology::Loop]
SmLoop::~SmLoopSmLoop.h:543[crate::topology::Loop]
SmLoop::GetFaceSmLoop.h:614[loop_face], [loop_loopuse], [loop_loopuses]
SmLoop::GetLoopuseSmLoop.h:651[loop_face], [loop_loopuse], [loop_loopuses]
SmLoop::GetVerticesSmLoop.h:661[loop_vertices], [loop_edges], [loop_edgeuses]
SmLoop::GetEdgesSmLoop.h:681[edges], [edgeuses], [vertexuses], [vertices]
SmLoop::GetEdgeusesSmLoop.h:691[edges], [edgeuses], [vertexuses], [vertices]
SmLoop::GetLoopusesSmLoop.h:707[loop_face], [loop_loopuse], [loop_loopuses]
SmLoop::GetClassStringSmLoop.h:1571[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLoop::GetClassTypeSmLoop.h:1571[LOOP_TYPE], [LOOP_TYPE_STRING], [LOOP_CLASS_STRING], [loop_class_type], [loop_is_kind_of]
SmLoop::GetTypeSmLoop.h:1571[LOOP_TYPE], [LOOP_TYPE_STRING], [LOOP_CLASS_STRING], [loop_class_type], [loop_is_kind_of]
SmLoop::GetTypeStringSmLoop.h:1571[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLoopuse::SmLoopuseSmLoopuse.h:608[crate::topology::Loopuse]
SmLoopuse::~SmLoopuseSmLoopuse.h:697[crate::topology::Loopuse]
SmLoopuse::GetVertexuseSmLoopuse.h:941[vertexuse], [faceuse], [loop_], [orientation], [other_loopuse]
SmLoopuse::GetFaceuseSmLoopuse.h:951[vertexuse], [faceuse], [loop_], [orientation], [other_loopuse]
SmLoopuse::GetLoopSmLoopuse.h:961[vertexuse], [faceuse], [loop_], [orientation], [other_loopuse]
SmLoopuse::GetOrientationSmLoopuse.h:971[vertexuse], [faceuse], [loop_], [orientation], [other_loopuse]
SmLoopuse::GetOtherLoopuseSmLoopuse.h:981[vertexuse], [faceuse], [loop_], [orientation], [other_loopuse]
SmLoopuse::GetEUorVUSmLoopuse.h:1011[eu_or_vu], [loopuse_type]
SmLoopuse::GetLoopuseTypeSmLoopuse.h:1021[eu_or_vu], [loopuse_type]
SmLoopuse::IsVertexLoopuseSmLoopuse.h:1051[is_vertex_loopuse], [is_edge_loopuse]
SmLoopuse::IsEdgeLoopuseSmLoopuse.h:1061[is_vertex_loopuse], [is_edge_loopuse]
SmLoopuse::SetOrientationSmLoopuse.h:1281[set_orientation], [set_loop], [set_edgeuse]
SmLoopuse::SetLoopSmLoopuse.h:1291[set_orientation], [set_loop], [set_edgeuse]
SmLoopuse::GetClassStringSmLoopuse.h:1571[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLoopuse::GetTypeSmLoopuse.h:1571[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLoopuse::GetTypeStringSmLoopuse.h:1571[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLoop::FlipLoopOrientationSmLoop.cpp:5282[flip_loop_orientation]
SmLoop::IsOuterLoopSmLoop.cpp:18810[is_outer_loop]
SmLoop::IsClosed3dSmLoop.cpp:24819[loop_is_closed_3d], [loop_is_closed_ptrs]
SmLoop::IsClosedPtrsSmLoop.cpp:27310[is_closed_ptrs]
SmLoop::IsConnectedToSmLoop.cpp:29845[loop_is_connected_to]
SmLoop::GetUVCornerBoundariesSmLoop.cpp:38692[uv_corner_boundaries], [UvCorners]
sm_CalcQuadNumSmLoop.cpp:4877[calc_quad_num]
SmLoop::IsKindOfSmLoop.cpp:17614[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmLoopuse::CollectEdgeusesSmLoopuse.cpp:6655[collect_edgeuses]
SmLoopuse::GetEdgesSmLoopuse.cpp:24039[edges], [edgeuses], [vertexuses], [vertices]
SmLoopuse::GetEdgeusesSmLoopuse.cpp:28960[edges], [edgeuses], [vertexuses], [vertices]
SmLoopuse::GetVertexusesSmLoopuse.cpp:35550[edges], [edgeuses], [vertexuses], [vertices]
SmLoopuse::GetVerticesSmLoopuse.cpp:41153[edges], [edgeuses], [vertexuses], [vertices]
SmLoopuse::GetShellSmLoopuse.cpp:5338[shell]
SmLoopuse::SetEdgeuseSmLoopuse.cpp:65812[set_orientation], [set_loop], [set_edgeuse]
SmLoopuse::IsClosed3dSmLoopuse.cpp:773136[is_closed_3d], [Closed3d]
SmLoopuse::IsClosedPtrsSmLoopuse.cpp:91751[is_closed_ptrs]
SmLoopuse::IsConnectedToSmLoopuse.cpp:98339[is_connected_to]
SmLoopuse::IsLoopuseSideInSurfaceSmLoopuse.cpp:103466[is_loopuse_side_in_surface], [LoopuseSide]
SmLoopuse::IsMissingSeamAtVerticesSmLoopuse.cpp:111562[is_missing_seam_at_vertices]
SmLoopuse::IsKindOfSmLoopuse.cpp:15694[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
Module file-header table (24 rows)
RustUpstream
[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]SmLoopuse::GetType, GetTypeString, GetClassString, IsKindOf
[LOOP_TYPE], [LOOP_TYPE_STRING], [LOOP_CLASS_STRING], [loop_class_type], [loop_is_kind_of]SmLoop::GetType, GetTypeString, GetClassString, GetClassType, IsKindOf
[crate::topology::Loopuse]SmLoopuse (members; Default is SmLoopuse(), Drop ~SmLoopuse)
[crate::topology::Loop]SmLoop (m_pLU is [crate::topology::Loop::loopuse]; SmLoop() / ~SmLoop)
[vertexuse], [faceuse], [loop_], [orientation], [other_loopuse]SmLoopuse::GetVertexuse, GetFaceuse, GetLoop, GetOrientation, GetOtherLoopuse
[eu_or_vu], [loopuse_type]SmLoopuse::GetEUorVU, GetLoopuseType
[is_vertex_loopuse], [is_edge_loopuse]SmLoopuse::IsVertexLoopuse, IsEdgeLoopuse
[set_orientation], [set_loop], [set_edgeuse]SmLoopuse::SetOrientation, SetLoop, SetEdgeuse
[collect_edgeuses]SmLoopuse::CollectEdgeuses
[edges], [edgeuses], [vertexuses], [vertices]SmLoopuse::GetEdges, GetEdgeuses, GetVertexuses, GetVertices (SmTArray overloads)
[shell]SmLoopuse::GetShell
[is_closed_3d], [Closed3d]SmLoopuse::IsClosed3d
[is_closed_ptrs]SmLoopuse::IsClosedPtrs
[is_connected_to]SmLoopuse::IsConnectedTo
[is_missing_seam_at_vertices]SmLoopuse::IsMissingSeamAtVertices
[loop_face], [loop_loopuse], [loop_loopuses]SmLoop::GetFace, GetLoopuse, GetLoopuses
[loop_vertices], [loop_edges], [loop_edgeuses]SmLoop::GetVertices, GetEdges, GetEdgeuses
[flip_loop_orientation]SmLoop::FlipLoopOrientation
[is_outer_loop]SmLoop::IsOuterLoop
[loop_is_closed_3d], [loop_is_closed_ptrs]SmLoop::IsClosed3d, IsClosedPtrs
[loop_is_connected_to]SmLoop::IsConnectedTo
[uv_corner_boundaries], [UvCorners]SmLoop::GetUVCornerBoundaries
[calc_quad_num]sm_CalcQuadNum (static)
[is_loopuse_side_in_surface], [LoopuseSide]SmLoopuse::IsLoopuseSideInSurface

Upstream tests reaching this unit

prog_test:my_test_extent3d, prog_test:my_test_vector2d, 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