Expand description
Boolean operations.
Elsewhere: BOPDS, BOPAlgo, BOPTools, IntTools and BRepAlgoAPI.
The architectural insight worth preserving: fuse, common, cut, section and split are one algorithm (general fuse) plus a selection predicate. The pipeline is
- a data structure of indexed sub-shapes, per-type interference lists (V/V, V/E, V/F, E/E, E/F, F/F), pave blocks and common blocks;
- a pave filler running in strictly increasing dimension, ending in face/face intersection, section-edge construction and pcurve generation;
- a builder that splits faces in 2D parametric space, unifies same-domain faces, rebuilds solids from face sets, and repairs tolerances;
- filters that select from the general-fuse result.
§One pipeline, any analytic face
The pipeline runs on solids whose faces are any surface §7’s intersectors
answer for (planes, cylinders, spheres, cones, tori), with the planar
case as nothing more than the case where every curve is a line. Sections
come from intersect_surfaces, exact
with same-parameter pcurves where the projection has a closed form and
marched and fitted to a stated tolerance where it does not. Paves (the
points where sections meet boundary edges and each other) come from the
exact curve/curve intersection. Every face is then split in its own
parameter space by an arrangement of strands: polyline scaffolding, each
naming the exact sub-curve it stands for, so the combinatorics run on
polylines and the rebuilt result is exact curves, pcurves attached both
sides, sewn back into shared topology by the sewing whose flipped-carry
bug this crate found and §9 fixed.
Pieces are classified against the other solid by the exact ray classifier and the filters select: fuse keeps what is outside, common what is inside, cut flips the tool’s contribution. Same-domain contact (a piece lying on the other boundary) and tangential touching are refused with an error naming the deferred entry, never silently mishandled.
Structs§
- Cells
- The three cells two solids cut space into, each one boolean’s answer:
what is only in
a, what is only inb, and what is in both. Arbitrary set expressions compose by fusing a selection of these.
Functions§
- cells
- Split two solids into their three cells.
- common
- The intersection of two solids.
- cut
- The first solid with the second removed.
- cut_
fuzzy cutat a stated fuzz.- fuse
- The union of two solids.
- fuse_
fuzzy fusewith geometry withinfuzzof touching counted as touching.- make_
periodic - A shape repeated
counttimes along a direction at a period and fused into one: the periodic pattern as a composition of what exists. - make_
volume - Solids from an unordered soup of faces: sew, demand closure, nest shells into solids and voids: the pipeline’s own final stages offered as a builder.
- remove_
faces - Remove
facesfromsolidand close the openings from the neighbours’ own geometry. - section
- The edges where the two solids’ boundaries cross.