solidcore

Units / boolean

boolean.merge_p1 partial

Layer
53
Upstream lines
993
Functions
24
Rust module
boolean::merge::p1

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

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

Notes

CO-PORTED in boolean.api_brep (PR #81): SmMergeOptions (fields, ctor, defaults, copy ctor, getters/setters) -> solidcore::boolean::merge::p1::MergeOptions (crates/solidcore/src/boolean/merge/p1.rs; extend it, keep boolean/merge.rs as the split root); 24 fns; largest: SmMerge::BooleanPostProcess, SmMerge::FixFoundFaceCoincidence, sm_FindBrepRegionOfOtherFace, SmMerge::PropagateOtherSrcRegionAttribs; cycle back-edges (call into later units; stub or co-port): blend.fillet_executive_p1(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; PR #163: merge control, face coincidence fast path, mapped vertex copy with topology/attribute notification, cleanup and region-attribute propagation; cross-B-rep radial classification keeps operand ids separate. Difftest 248 cases (152 fixtures + 96 generated), 175 passed, 73 deferred, 0 failed, max_rel_err=0, no absolute floors. Deferred: query.brep(14), topology.brep_p1(33), topology.brep_p9(3), topology.edgeuse_p2(20), topology.face_p2(3). DeleteEdge/DeleteVertex/DeleteTopologicalVertex remain tagged back-edges; scoped translation waits for query.brep bounding boxes; intersector construction is supplied by its owner. Wired to topology.shell (PR #154): SmRegion::IsVoid in sm_EdgeBordersSolid, SmShell::IsWireShell/IsFaceuseShell in BooleanPostProcess, region propagation takes a RegionLookup for the source regions' IsVoid. The wire/face shell combine block of BooleanPostProcess is wired end to end (GetCommonVertices = the B-rep vertices with an other mate in the shared mates, as TopologyIntersector::common_vertices after PR #146; then ignored-status shell::transfer_children and shell::region_remove_shell; boolean_post_process takes &mut Kernel for the mark lock) and is unreachable today because brep_shells / brep_vertices are UNPORTED(topology.brep_p1). No UNPORTED(boolean.merge_p1) callers on main. Review fixes: SM_USE_OLDTOL vertex tolerance growth restored; face tolerance growth calls a topology.face_p3 stub with old tolerance + dist_between. GetEdges/GetShells use topology.brep_p1 stubs (including count-only queries); no arena-order stand-ins. Reuses public topology_traverser::face_edges with per-loop uniqueness, stale-vertex sanity bound and unconditional merged-domain restore. Mapped/new vertex notification identities derive from ids; new MakeShellVertex path calls the intersector Relate (boolean::topology_intersector::p1::Relations::relate_vertices, wired in PR #146; the other operand is now mutable). merge_p5 now uses shared mutable bidirectional mates and the real MergeVertex adapter. 16 directed unequal-tolerance cases pass. Independent-operand radial queries and mated face-region cases are covered; full step-off numerics remain deferred, two cross-operand wire-sector cases compare real topology. Relate wired, not certified (PR #146): Relations::relate_vertices is reached only after UNPORTED(topology.brep_p9) MakeShellVertex, so no passing case runs it yet.

Difftest

Cases
248
Passed
175
Deferred
73
Failed
0
Both errored
0
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
topology.brep_p1 claimed33
topology.edgeuse_p2 partial20
query.brep claimed14
topology.brep_p9 claimed3
topology.face_p2 partial3

Report JSON (per-case results)

Dependencies

Depends on: boolean.topology_intersector_p1 partial geom.a_object partial geom.attribute green geom.extent3d green geom.object partial geom.tol green geom.vector3d green intersect.point_class partial topology.brep_p1 claimed topology.edge partial topology.edgeuse_p1 partial topology.face_p2 partial topology.proto_topology_p1 partial topology.shell partial topology.vertex partial

Soft dependencies: boolean.topology_intersector_p2 claimed boolean.topology_intersector_p3 claimed curve.curve_p2 green geom.axis2_placement green geom.extent1d green geom.extent2d green query.brep claimed surface.surface_p1 partial surface.surface_p2 partial topology.brep_p4 claimed topology.brep_p5 claimed topology.brep_p9 claimed topology.face_p3 claimed topology.face_p4 claimed topology.topology green

Dependents: blend.fillet_executive_p1 todo blend.fillet_executive_p2 todo blend.fillet_executive_p3 todo boolean.merge_p2 todo boolean.merge_p4 todo boolean.merge_p5 partial

Soft dependents: blend.fillet_corner_p1 todo blend.fillet_geom_p4 todo blend.fillet_geom_p6 todo boolean.api_brep partial

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmMergeOptions::~SmMergeOptionsSmMerge.h:1581
SmMergeOptions::GetCookieCutterSmMerge.h:1611
SmMergeOptions::GetImprintingSmMerge.h:1621
SmMergeOptions::GetBooleanPostProcessSmMerge.h:1631
SmMergeOptions::GetImprintAndClassifyFacesSmMerge.h:1641
SmMergeOptions::GetKeepOtherBrepSmMerge.h:1651
SmMerge::~SmMergeSmMerge.h:3011
SmMerge::SetBooleanPostProcessSmMerge.h:4331
SmMerge::SetCookieCutterSmMerge.h:4341
SmMerge::SetImprintingSmMerge.h:4351
SmMerge::SetKeepOtherBrepSmMerge.h:4361
SmMerge::SetClassifyFacesSmMerge.h:4371
SmMerge::GetTopologyIntersectorSmMerge.h:4581[MergeState]
SmMergeOptions::SmMergeOptionsSmMerge.cpp:3312[MergeOptions::new]
SmMerge::SmMergeSmMerge.cpp:16711[MergeState]
sm_FindBrepRegionOfOtherFaceSmMerge.cpp:186129[find_brep_region_of_other_face]
SmMerge::SetMergeOptionsSmMerge.cpp:31911[MergeState]
SmMerge::BooleanPostProcessSmMerge.cpp:827491[boolean_post_process]
SmMerge::FixFoundFaceCoincidenceSmMerge.cpp:2129146[fix_found_face_coincidence]
sm_EdgeBordersSolidSmMerge.cpp:231019[edge_borders_solid]
SmTemporaryBrepTransform::SmTemporaryBrepTransformSmMerge.cpp:234723[temporary_brep_transform]
SmTemporaryBrepTransform::~SmTemporaryBrepTransformSmMerge.cpp:237213
SmMerge::MergeVertexSmMerge.cpp:677744[merge_vertex]
SmMerge::PropagateOtherSrcRegionAttribsSmMerge.cpp:778281[propagate_other_src_region_attribs]
Module file-header table (12 rows)
RustUpstream
[MergeOptions]SmMergeOptions (fields, Get*, SetGet*)
[MergeOptions::new]SmMergeOptions::SmMergeOptions(...)
[MergeOptions::default]SmMergeOptions() (all default arguments)
CloneSmMergeOptions(const SmMergeOptions&)
[MergeState]SmMerge(context), SetMergeOptions, setters, GetTopologyIntersector
[fix_found_face_coincidence]SmMerge::FixFoundFaceCoincidence
[find_brep_region_of_other_face]sm_FindBrepRegionOfOtherFace
[edge_borders_solid]sm_EdgeBordersSolid
[merge_vertex]SmMerge::MergeVertex
[boolean_post_process]SmMerge::BooleanPostProcess
[propagate_other_src_region_attribs]SmMerge::PropagateOtherSrcRegionAttribs
[temporary_brep_transform]SmTemporaryBrepTransform (constructor/destructor)

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