solidcore

Units / boolean

boolean.topology_intersector_p1 partial

Layer
50
Upstream lines
2,491
Functions
38
Rust module
boolean::topology_intersector::p1

Source: crates/solidcore/src/boolean/topology_intersector/p1.rs

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

Notes

partial (PR #146, builds on #121 and #150): after the maintainer review and the swarm pre-review, difftest 827 cases (8 upstream-derived fixtures + 19 edge cases built in code + 800 generated two-B-rep scripts, each run up to its first unrunnable op), 653 pass bit-identical (max_rel_err 0), 0 fail, 174 deferred (topology.face_p2 82: SmFace::GetTolerance via SmSurface::DropPoint of a face-owned surface; topology.brep_p1 74: GetVertices/GetEdges/GetTolerance; topology.face_p4 11: SmFace::GetVertices/GetEdges; query.face_p1 7: SmFace::CalculateBoundingBox), 3 cases_both_errored (scripts cut at op 0), 32 passes compare one refused op's status only; --perturb SENSITIVE 653/653. Ops with zero passing cases: sm_IntersectShellVertices and sm_IntersectWireLaminaEdges (all reach topology.brep_p1). UNPORTED stubs: topology.brep_p1/p3/p5/p7/p9, topology.face_p1/p3/p4, query.face_p1, intersect.curve_class_p4; surface.surface_p8, intersect.curve_class_p5 and _p6 are wired. Registered SSI curves of the script are plain B-splines (a line/conic registered there is never compared). CO-PORTED here: the two SmTopologyIntersector constructors (boolean.topology_intersector_p2) -> boolean::topology_intersector::p1::TopologyIntersector::{new, with_context}; SmTol::UpdateObjectTolerance (geom.tol) -> geom::tol::update_object_tolerance. 38 fns; largest: SmTopologyIntersector::EdgeFaceIntersect, SmTopologyIntersector::FaceFaceIntersect, SmTopologyIntersector::FixupMidPointClassMates, SmTopologyIntersector::FaceFaceCoincidence; unit-SCC #22 (220 units); hazards: ptr-hash,ptr-iter; 317 upstream test entry points reach this unit CO-PORTED in boolean.merge_p1 (PR #163): m_pBToO/m_pOToB edge/vertex storage and bidirectional lookups -> boolean::topology_intersector::p1::{MateMap,Relations}; record() checks conflicting established pairs atomically. Relate of a new merge vertex (SmMerge::MergeVertex, boolean.merge_p1) is wired to boolean::topology_intersector::p1::Relations::relate_vertices (Relate's vertex branch on Brep ids, including the SM_USE_OLDTOL tolerance propagation; merge_vertex and merge_p5's process_wires_and_shell_vertices now take the other B-rep mutably). Maintainer merge of main (PR #146): SmFace::CalculateUVDomainFromUVTrimCurves wired to topology.face_p1 (PR #148) through IntersectorBrep::face_uv_domain_from_uv_trim_curves (bLimitDomain TRUE, no gaps); every call site is still reached only after an UNPORTED query.face_p1 / topology.face_p4 call, and face_p1 itself defers on CreateUVTrimCurves (topology.face_p3). Upstream issue WR-102 renumbered WR-157.

Difftest

Cases
827
Passed
653
Deferred
174
Failed
0
Both errored
3
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
topology.face_p2 partial82
topology.brep_p1 claimed74
topology.face_p4 claimed11
query.face_p1 claimed7

Report JSON (per-case results)

Dependencies

Depends on: curve.curve_p2 green geom.extent1d green geom.extent2d green geom.extent3d green geom.object partial geom.solution_array partial geom.tol green geom.vector2d green geom.vector3d green intersect.curve_class_p1 partial intersect.point_class partial topology.edge partial topology.face_p2 partial topology.face_p4 claimed topology.proto_topology_p1 partial topology.proto_topology_p2 partial topology.proto_topology_p3 partial topology.vertex partial

Soft dependencies: curve.curve_p6 green curve.curve_p8 green geom.context green intersect.curve_class_p4 claimed intersect.curve_class_p5 partial intersect.curve_class_p6 partial intersect.topology_solver_p2 partial nurbs.b_spline_curve_p1 green query.edge partial query.face_p1 claimed query.face_p2 partial surface.surface_p2 partial surface.surface_p5 green surface.surface_p7 partial surface.surface_p8 partial topology.brep_p1 claimed topology.brep_p3 claimed topology.brep_p5 claimed topology.brep_p7 claimed topology.brep_p9 claimed topology.edgeuse_p1 partial topology.face_p1 partial topology.face_p3 claimed

Dependents: blend.fillet_executive_p3 todo boolean.merge_p1 partial boolean.merge_p2 todo boolean.merge_p3 todo boolean.merge_p4 todo boolean.merge_p5 partial boolean.topology_intersector_p2 claimed boolean.topology_intersector_p3 claimed

Soft dependents: blend.fillet_executive_p1 todo blend.fillet_executive_p2 todo blend.fillet_geom_p6 todo

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmIntersectionResults::SmIntersectionResultsSmTopologyIntersector.h:666[IntersectionResults]
SmIntersectionTable::SmIntersectionTableSmTopologyIntersector.h:881[IntersectionTable]
SmTopologyIntersector::GetContextSmTopologyIntersector.h:3194[TopologyIntersector::context]
SmTopologyIntersector::GetPrimaryBrepSmTopologyIntersector.h:4171[TopologyIntersector::primary_brep], [TopologyIntersector::other_brep]
SmTopologyIntersector::GetOtherBrepSmTopologyIntersector.h:4191[TopologyIntersector::primary_brep], [TopologyIntersector::other_brep]
SmTopologyIntersector::GetThisApproxTol3dSmTopologyIntersector.h:4211[TopologyIntersector::this_approx_tol_3d]
SmTopologyIntersector::SetPrimaryBrepSmTopologyIntersector.h:4251[TopologyIntersector::set_primary_brep], [TopologyIntersector::set_other_brep]
SmTopologyIntersector::SetOtherBrepSmTopologyIntersector.h:4271[TopologyIntersector::set_primary_brep], [TopologyIntersector::set_other_brep]
SmTopologyIntersector::SetThisApproxTol3dSmTopologyIntersector.h:4291[TopologyIntersector::set_this_approx_tol_3d]
SmTopologyIntersector::~SmTopologyIntersectorSmTopologyIntersector.cpp:627[TopologyIntersector::destroy]
SmIntersectionTable::~SmIntersectionTableSmTopologyIntersector.cpp:13926[IntersectionTable::destroy]
SmTopologyIntersector::ClearExistingSSISmTopologyIntersector.cpp:1716[TopologyIntersector::clear_existing_ssi]
SmTopologyIntersector::CheckIfHaveExistingSSISmTopologyIntersector.cpp:18465[TopologyIntersector::check_if_have_existing_ssi]
SmTopologyIntersector::GetOtherMateSmTopologyIntersector.cpp:82311[TopologyIntersector::other_mate]
SmTopologyIntersector::GetThisMateSmTopologyIntersector.cpp:84111[TopologyIntersector::this_mate]
SmTopologyIntersector::IsMatedPairSmTopologyIntersector.cpp:85819[TopologyIntersector::is_mated_pair]
SmTopologyIntersector::GetBrepMateSmTopologyIntersector.cpp:88415[TopologyIntersector::brep_mate]
SmTopologyIntersector::GetMappedBrepObjectsSmTopologyIntersector.cpp:93322[TopologyIntersector::mapped_brep_objects]
SmTopologyIntersector::GetCommonEdgesSmTopologyIntersector.cpp:100931[TopologyIntersector::common_edges]
SmTopologyIntersector::GetCommonVerticesSmTopologyIntersector.cpp:104730[TopologyIntersector::common_vertices]
sm_CanImprintSmTopologyIntersector.cpp:12778can_imprint (private)
sm_FindFirstLowestDimensionSolSmTopologyIntersector.cpp:129353[find_first_lowest_dimension_sol]
sm_IntersectShellVerticesSmTopologyIntersector.cpp:135485[intersect_shell_vertices]
sm_IntersectWireLaminaEdgesSmTopologyIntersector.cpp:1447126[intersect_wire_lamina_edges]
SmTopologyIntersector::ResolveIntersectionsSmTopologyIntersector.cpp:225145[TopologyIntersector::resolve_intersections]
SmTopologyIntersector::ImprintIntersectionsSmTopologyIntersector.cpp:2302112[TopologyIntersector::imprint_intersections]
sm_SetEdgeClassSmTopologyIntersector.cpp:2693137[set_edge_class]
SmTopologyIntersector::RelateSmTopologyIntersector.cpp:527585[TopologyIntersector::relate]
SmTopologyIntersector::FixupEndPointClassMatesSmTopologyIntersector.cpp:556184[TopologyIntersector::fixup_end_point_class_mates]
SmTopologyIntersector::FixupMidPointClassMatesSmTopologyIntersector.cpp:5663200[TopologyIntersector::fixup_mid_point_class_mates]
SmTopologyIntersector::SetSubsetSmTopologyIntersector.cpp:644826[TopologyIntersector::set_subset]
sm_CheckInteriorEdgeSmTopologyIntersector.cpp:657150[check_interior_edge]
sm_TestAndSplitTwoEdgesSmTopologyIntersector.cpp:6641133[test_and_split_two_edges]
sm_TestAndImprintFaceSmTopologyIntersector.cpp:678379[test_and_imprint_face]
SmTopologyIntersector::VertexFaceIntersectSmTopologyIntersector.cpp:7029109[TopologyIntersector::vertex_face_intersect]
SmTopologyIntersector::EdgeFaceIntersectSmTopologyIntersector.cpp:7324404[TopologyIntersector::edge_face_intersect]
SmTopologyIntersector::FaceFaceIntersectSmTopologyIntersector.cpp:8009340[TopologyIntersector::face_face_intersect]
SmTopologyIntersector::FaceFaceCoincidenceSmTopologyIntersector.cpp:8374155[TopologyIntersector::face_face_coincidence]
Module file-header table (45 rows)
RustUpstream
[IntersectionResults]SmIntersectionResults, SmIntersectionResults()
[IntersectionTable]SmIntersectionTable, SmIntersectionTable()
[IntersectionTable::destroy]~SmIntersectionTable
[TopologyIntersector]SmTopologyIntersector
[TopologyIntersector::destroy]~SmTopologyIntersector
[TopologyIntersector::clear_existing_ssi]ClearExistingSSI
[TopologyIntersector::check_if_have_existing_ssi]CheckIfHaveExistingSSI
[TopologyIntersector::context]GetContext
[TopologyIntersector::other_mate]GetOtherMate
[TopologyIntersector::this_mate]GetThisMate
[TopologyIntersector::is_mated_pair]IsMatedPair
[TopologyIntersector::brep_mate]GetBrepMate
[TopologyIntersector::mapped_brep_objects]GetMappedBrepObjects
[TopologyIntersector::common_edges]GetCommonEdges
[TopologyIntersector::common_vertices]GetCommonVertices
can_imprint (private)sm_CanImprint
[find_first_lowest_dimension_sol]sm_FindFirstLowestDimensionSol
[intersect_shell_vertices]sm_IntersectShellVertices
[intersect_wire_lamina_edges]sm_IntersectWireLaminaEdges
[TopologyIntersector::resolve_intersections]ResolveIntersections
[TopologyIntersector::imprint_intersections]ImprintIntersections
[set_edge_class]sm_SetEdgeClass
[TopologyIntersector::relate]Relate
[TopologyIntersector::fixup_end_point_class_mates]FixupEndPointClassMates
[TopologyIntersector::fixup_mid_point_class_mates]FixupMidPointClassMates
[TopologyIntersector::set_subset]SetSubset
[check_interior_edge]sm_CheckInteriorEdge
[test_and_split_two_edges]sm_TestAndSplitTwoEdges
[test_and_imprint_face]sm_TestAndImprintFace
[Reason]sReasonType
[TopologyIntersector::vertex_face_intersect]VertexFaceIntersect
[TopologyIntersector::edge_face_intersect]EdgeFaceIntersect
[TopologyIntersector::face_face_intersect]FaceFaceIntersect
[TopologyIntersector::face_face_coincidence]FaceFaceCoincidence
[TopologyIntersector::primary_brep], [TopologyIntersector::other_brep]GetPrimaryBrep, GetOtherBrep
[TopologyIntersector::this_approx_tol_3d]GetThisApproxTol3d
[TopologyIntersector::set_primary_brep], [TopologyIntersector::set_other_brep]SetPrimaryBrep, SetOtherBrep
[TopologyIntersector::set_this_approx_tol_3d]SetThisApproxTol3d
[TopologyIntersector::new], [TopologyIntersector::with_context]the two constructors (CO-PORTED from boolean.topology_intersector_p2)
[TopologyIntersector::subset]GetSubset
[TopologyIntersector::this_ang_tol_rad], [TopologyIntersector::set_this_ang_tol_rad]GetThisAngTolRad, SetThisAngTolRad
[IntersectorBrep]what the intersector reads from and writes to its two SmBreps
[MateMap], [Relations]m_pBToO, m_pOToB (edge/vertex subset over [Brep] ids; CO-PORTED by boolean.merge_p1)
[MateMap::other], [MateMap::primary]GetOtherMate, GetBrepMate over [Brep] ids
[Relations::relate_vertices]Relate of two vertices over [Brep] ids

Upstream tests reaching this unit

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, SM_API_test:TestSmCreateRectangle, SM_API_test:TestSmCreateRegularPolygon