solidcore

Units / topology

topology.vertex green

Layer
38
Upstream lines
1,791
Functions
46
Rust module
topology::vertex

Status history

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

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

Upstream: source/SMLib/inc/SmVertex.h, source/SMLib/src/SmVertex.cpp

Port-plan notes

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

Rust B-rep: own_builder for shim-built sources and chains, own_reader::file_in_order for .smb files (Rust reader, renumbered into the shim walk order), no C++ export on the Rust side; the inexact-surface deferral of the solving ops no longer applies (the C++ side still resolves selectors on its own import). GREEN: difftest 5954 cases, 5954 pass, 0 failed, 0 deferred, 0 known mismatches (the 9 corner_*_off1em5 cases fixed by the runner's face-surface owner). #1419 WP2 (PR #1472): SmVertex::CheckPointers -> topology::vertex::check_pointers; difftest 5663 cases, 5663 passed, 0 deferred (65 new level0 cases: every vertex of the pt_TestFiles B-reps, holed-face files, generated B-reps, the wire network). #700 stack: 20 constant-segment/control fixtures added to fixtures/topology.vertex/constructed.json (parity coverage; no vertex behaviour change). PARTIAL: difftest 5508 cases (5492 fixture: 1408 review (rational degree-1 / quadratic / arc edges meeting lines and arcs at a vertex, B-spline-line and reversed SmLine turns at 0.49..180 degrees, 1e-12..1e12 scales, 2- and 3-edge closed chains, tangent / gap / SetTolerance limits); 2160 on 15 upstream .smb B-reps read by SmBrep::ReadFromFile, some with RebuildUVTrimCurves; 1665 constructed: prog_test my_test_topology's wire network, my_test_edge_geometry_repairs' wire line (SetTolerance/SetPoint), chains of wire edges from real SmLines (re-parameterised), degree-1 B-spline lines and B-spline curves turning by 0 to 180 degrees around the 0.5 degree continuity limit (IsTopologicalVertex / AreEdgesTangent), closed squares, a closed seam curve, wire edges and plane / B-spline / pinched faces (full and sub-domain); 259 adversarial: 1e-6..1e6 scales, zero-length and tiny segments, a point B-spline, tolerance limits incl. SM_USE_DEFAULT and negatives, gap tolerance limits, every notify operation, null selectors, far edges; 16 generated), 4651 pass, 857 deferred (topology.edgeuse_p3 399, surface.surface_p3 382, topology.face_p3 76; SmEdge::SetTolerance wired by topology.edge PR #103; after merging main: SmFace::GetUpwardFaceuse wired to topology::face::p2::upward_faceuse, the shim exports each face's upward face use, and heal.gap gaps are real), max_rel_err 0; --perturb SENSITIVE. Runner imports the shim's exported graph (with each vertex's vertex use list in upstream order, cached gap values, edge curve identity) into topology::Brep. topology::Vertex gains vertexuses (m_pList) and poly_vertex; SM_TOLERANT_WATCH is off in the reference build (no m_bExact: IsExact is TRUE, SetExact no-op). Upstream bugs WR-91 (GetVertexuseOfFace ignores its face), WR-92 (IsTopologicalVertex SER/cusps), UB-105 (GetMaxUpDimGap3d NULL array), UB-106 (uninitialised tangents). Wired UNPORTED(topology.vertex) in geom::tools (geom.tools: 60 deferred now pass); generic-handle stubs in intersect::point_class, geom::solution_array, geom::object, geom::tol, surface::trim_srf_cache, topology::proto_topology::p1::proto and query::poly stay (opaque handles, plan/findings.md); the co-ported vertex use scans in topology::vertexuse now call topology::vertex. Plan notes: 38 fns; largest: SmVertex::IsTopologicalVertex, SmVertex::Notify, SmVertex::IsConnectedTo, SmVertex::GetMaxUpDimGap3d; cycle back-edges (call into later units; stub or co-port): topology.edge(12), heal.gap(4), topology.loopuse(2), blend.fillet_geom_p1(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): SmVertex::m_sZoneTol3d -> topology::Vertex::tolerance; CO-PORTED in topology.vertexuse (PR #88): SmVertex::GetVertexuses / GetVertexusesOfEdge / GetVertexusesOfFace (replaced by topology::vertex in PR #96); CO-PORTED in topology.face_p2 (PR #91): SmVertex::GetEdges without face filter (uses found by scanning the B-rep's vertex uses) -> private topology::face::p2::vertex_edges Re-run (PR #52, after merging surface_p4/#49 and surface_p5/#50): 5508 cases, 4984 pass, 524 deferred (topology.edgeuse_p3 448, topology.face_p3 76). [topology.edgeuse_p3 wired (PR #117): 5508 cases, 4896 pass, 0 failed, 612 deferred (surface.cone_p1 104, surface.sphere 104, surface.surf_of_extrusion_p2 104, topology.brep_p10 224, topology.face_p3 76)] [PR #155: the inexact-import deferrals are labelled topology.brep_p10 SmBrep::MakeTopologyFromData, not topology.brep_p7 SmBrep::ReadFromFile] [topology.face_p3 wired (PR #139, SmFace::SetTolerance in RefreshTolerance): 5508 cases, 4972 pass, 0 failed, 536 deferred (surface.cone_p1 104, surface.sphere 104, surface.surf_of_extrusion_p2 104, topology.brep_p10 224)] [2026-10-23 GREEN (PR #605): the shim exports each analytic face surface exactly (sc_analytic_export.h record head) and the runner reads it with util::read_exact_surface, so cone/sphere/revolution/extrusion faces are real SurfaceKinds and the solving ops compare values: PASS topology.vertex cases=5508 passed=5508 failed=0 deferred=0 max_rel_err=0e0 with_values=5506 no_values=2 vacuous=0] [#521: a failed GetEndTangent in AreEdgesTangent / IsTopologicalVertex leaves the SmVector3d default (SM_UNDEF_DOUBLE), not an uninitialised tangent: the port reads Vec3::UNDEF (angle 0, TRUE) where it returned InvalidInput, and the shim refuses only a null curve (WR-256, UB-106 corrected); 70 cases in end_tangents.json (zero end tangents, 1e-30 end spans): PASS topology.vertex cases=5578 passed=5578 failed=0 deferred=0 max_rel_err=0e0 with_values=5576 no_values=2 vacuous=0] [PR #1478 (#1419 WP4a): sm_AssertTestVertex1, SmVertex::IsWithinXSectTol3dOfFaces, IsOnFaceCorner, CalcCornerFromFaces, HasParallelFaces -> topology::vertex::corner; Corner op with 291 cases in fixtures/topology.vertex/corner.json. PARTIAL: topology.vertex cases=5889 passed=5880 failed=0 deferred=0 known_mismatch=9 max_rel_err=0e0 (the 9 corner_{sphere,torus,toruswvy}_v*_off1em5 cases: the max vertex/face gap of the existing vertex use gap code after SetPoint on a seam/pole vertex, plan/findings/topology.vertex--moved-seam-pole-vertex-face-gap.md)]

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
5,954
Stored error outcomes
2
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.object green geom.tol green geom.vector3d green topology.edgeuse_p1 green topology.proto_topology_p1 green topology.topology green topology.vertexuse green

Soft dependencies: curve.curve_p5 partial geom.context green geom.extent1d green topology.face_p2 partial topology.shell green

Dependents: blend.feature_executive blocked blend.fillet_corner_p1 green blend.fillet_corner_p2 partial blend.fillet_corner_p3 partial blend.fillet_executive_p1 green blend.fillet_geom_p1 green blend.fillet_geom_p2 green blend.fillet_geom_p3 green blend.fillet_geom_p4 partial blend.fillet_geom_p5 green blend.fillet_geom_p6 green blend.fillet_removal green blend.fillet_solver_p1 green blend.fillet_solver_p2 green blend.fillet_solver_p3 green boolean.merge_p1 green boolean.topology_intersector_p1 green boolean.topology_intersector_p2 green heal.heal_data_p2 green heal.stitch_p1 green heal.stitch_p2 green offset.offset_executive_p1 partial offset.offset_geometry_creation partial sweep.topology_sweep green topology.brep_constructor green topology.brep_cutting partial topology.brep_p1 green topology.brep_p10 green topology.brep_p2 green topology.brep_p3 partial topology.brep_p4 green topology.brep_p5 green topology.brep_p6 green topology.brep_p9 green topology.face_p3 green topology.face_p4 green topology.topology_traverser green

Soft dependents: blend.fillet_executive_p3 partial blend.fillet_solver_p4 green blend.fillet_solver_p5 green blend.fillet_standard_solver_p2 green blend.hcr green boolean.merge_p2 green boolean.merge_p4 green boolean.merge_p5 green heal.face_props green heal.gap green heal.heal_data_p3 green mass.integrator partial primitive.primitive_creation_p2 green query.api_queries green query.brep green query.edge green query.face_p1 green query.face_p2 green query.face_p3 green query.face_p4 green query.poly green sweep.rotational_sweep_geometry green sweep.trans_sweep_geometry green topology.brep_cache green topology.brep_p8 green topology.edge green topology.edgeuse_p3 green topology.face_p1 green topology.loopuse green topology.proto_topology_p3 green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmVertex::SmVertexSmVertex.h:11712[crate::topology::Vertex]
SmVertex::~SmVertexSmVertex.h:1303[crate::topology::Vertex]
SmVertex::GetMaxGap3dSmVertex.h:1551[max_up_dim_gap_3d], [max_gap_3d], [VertexGap], [HeldGap]
SmVertex::GetPointSmVertex.h:1581[point], [set_point]
SmVertex::GetPolyVertexSmVertex.h:1801[poly_vertex], [set_poly_vertex]
SmVertex::SetExactSmVertex.h:2601[is_exact], [set_exact]
SmVertex::GetToleranceSmVertex.h:2681[tolerance], [set_tolerance], [refresh_tolerance]
SmVertex::GetClassStringSmVertex.h:3431[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmVertex::GetTypeSmVertex.h:3431[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmVertex::GetTypeStringSmVertex.h:3431[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
SmTopologyChangeCallback::AddUniqueSmTrackTopologyChanges.cpp:9532
SmTopologyChangeCallback::RecordDependenciesSmTrackTopologyChanges.cpp:40436
SmVertex::AreEdgesTangentSmVertex.cpp:7040[are_edges_tangent]
SmVertex::IsConnectedToSmVertex.cpp:15954[is_connected_to]
SmVertex::GetVertexuseOfFaceSmVertex.cpp:22550[vertexuse_of_face]
SmVertex::GetVertexusesOfFaceSmVertex.cpp:28339[vertexuses_of_face], [vertexuses_of_edge]
SmVertex::GetVertexusesOfEdgeSmVertex.cpp:42739[vertexuses_of_face], [vertexuses_of_edge]
SmVertex::GetCommonEdgesSmVertex.cpp:47234[edges], [common_edges]
SmVertex::GetEdgesSmVertex.cpp:51234[edges], [common_edges]
SmVertex::GetFacesSmVertex.cpp:55231[faces], [faceuses], [shells], [regions], [shell_in_region]
SmVertex::GetFaceusesSmVertex.cpp:58929[faces], [faceuses], [shells], [regions], [shell_in_region]
SmVertex::GetShellsSmVertex.cpp:62417[faces], [faceuses], [shells], [regions], [shell_in_region]
SmVertex::GetRegionsSmVertex.cpp:64717[faces], [faceuses], [shells], [regions], [shell_in_region]
SmVertex::GetShellInRegionSmVertex.cpp:67129[faces], [faceuses], [shells], [regions], [shell_in_region]
SmVertex::IsTopologicalVertexSmVertex.cpp:71694[is_topological_vertex], [is_on_pole]
SmVertex::IsOnPoleSmVertex.cpp:81722[is_topological_vertex], [is_on_pole]
SmVertex::SetPolyVertexSmVertex.cpp:10556[poly_vertex], [set_poly_vertex]
SmVertex::IsWireVertexSmVertex.cpp:106815[is_wire_vertex], [is_lamina_vertex]
SmVertex::IsLaminaVertexSmVertex.cpp:109015[is_wire_vertex], [is_lamina_vertex]
SmVertex::SetToleranceSmVertex.cpp:111434[tolerance], [set_tolerance], [refresh_tolerance]
SmVertex::HasParallelFacesSmVertex.cpp:1223142[corner]
SmVertex::CheckPointersSmVertex.cpp:1446262[check_pointers]
SmVertex::IsWithinXSectTol3dOfFacesSmVertex.cpp:172082[corner]
SmVertex::IsOnFaceCornerSmVertex.cpp:190453[corner]
SmVertex::CalcCornerFromFacesSmVertex.cpp:1973330[corner]
SmVertex::RefreshToleranceSmVertex.cpp:231324[tolerance], [set_tolerance], [refresh_tolerance]
SmVertex::NotifySmVertex.cpp:240258[notify]
sm_AssertTestVertex1SmVertex.cpp:255129[corner]
SmVertex::GetMaxUpDimGap3dSmVertex.cpp:297852[max_up_dim_gap_3d], [max_gap_3d], [VertexGap], [HeldGap]
SmVertex::IsShellVertexSmVertex.cpp:307010[is_shell_vertex], [is_loop_vertex]
SmVertex::IsLoopVertexSmVertex.cpp:309716[is_shell_vertex], [is_loop_vertex]
SmVertex::SetPointSmVertex.cpp:32556[point], [set_point]
SmVertex::GetPrimaryVertexuseSmVertex.cpp:32678[primary_vertexuse], [vertexuses], [vertexuses_with_attribute]
SmVertex::GetBrepSmVertex.cpp:328117[brep]
SmVertex::GetVertexusesSmVertex.cpp:33048[primary_vertexuse], [vertexuses], [vertexuses_with_attribute]
SmVertex::IsKindOfSmVertex.cpp:33174[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]
Module file-header table (26 rows)
RustUpstream
[TYPE], [TYPE_STRING], [CLASS_STRING], [is_kind_of]SmVertex::GetType, GetTypeString, GetClassString, IsKindOf
[crate::topology::Vertex]SmVertex (members; Default is SmVertex(), Drop ~SmVertex)
[point], [set_point]SmVertex::GetPoint, SetPoint
[tolerance], [set_tolerance], [refresh_tolerance]SmVertex::GetTolerance, SetTolerance, RefreshTolerance (SM_USE_OLDTOL)
edge_end_reach (crate)none (not upstream: a bound on the vertex's distance to its edge ends)
cover_merged_ends (crate)none (not upstream: a point merge's vertex covers its edge ends, #21340)
[is_exact], [set_exact]SmVertex::IsExact, SetExact (without SM_TOLERANT_WATCH)
[poly_vertex], [set_poly_vertex]SmVertex::GetPolyVertex, SetPolyVertex
[primary_vertexuse], [vertexuses], [vertexuses_with_attribute]SmVertex::GetPrimaryVertexuse, GetVertexuses
[brep]SmVertex::GetBrep
[vertexuse_of_face]SmVertex::GetVertexuseOfFace
[vertexuses_of_face], [vertexuses_of_edge]SmVertex::GetVertexusesOfFace, GetVertexusesOfEdge
[edges], [common_edges]SmVertex::GetEdges, GetCommonEdges
[faces], [faceuses], [shells], [regions], [shell_in_region]SmVertex::GetFaces, GetFaceuses, GetShells, GetRegions, GetShellInRegion
[is_connected_to]SmVertex::IsConnectedTo
[are_edges_tangent]SmVertex::AreEdgesTangent
[is_topological_vertex], [is_on_pole]SmVertex::IsTopologicalVertex, IsOnPole
[is_on_face_seam], [ends_seam_edge], [seam_edge], [is_seam_edge]none (not upstream, below)
[is_wire_vertex], [is_lamina_vertex]SmVertex::IsWireVertex, IsLaminaVertex
[is_shell_vertex], [is_loop_vertex]SmVertex::IsShellVertex, IsLoopVertex
[max_up_dim_gap_3d], [max_gap_3d], [VertexGap], [HeldGap]SmVertex::GetMaxUpDimGap3d, GetMaxGap3d (the SmGap* results)
[notify]SmVertex::Notify
[check_pointers]SmVertex::CheckPointers
[edge_start_vertex], [edge_vertex_pair], [edge_vertices], [edge_end_tangent]SmEdge::GetStartVertex, GetVertices(SmVertex*&, SmVertex*&), GetVertices(SmTArray&), GetEndTangent (CO-PORTED, topology.edge)
[loopuse_vertices], [loop_vertices]SmLoopuse::GetVertices, SmLoop::GetVertices (CO-PORTED, topology.loopuse)
[corner]SmVertex::IsWithinXSectTol3dOfFaces, HasParallelFaces, CalcCornerFromFaces, IsOnFaceCorner, sm_AssertTestVertex1

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