Expand description
Boolean-overlay engine — the segment-intersection kernel and the machinery built on top of it.
Mirrors boost/geometry/algorithms/detail/overlay/. Overlay is the
engine behind intersection, union, difference,
sym_difference, and (indirectly) buffer, is_valid, relate,
crosses, overlaps, touches, point_on_surface, and
merge_elements. Boost concentrates all of it under one detail
directory; the port gives it its own crate because the algorithmic
surface is too dense to share a crate with anything else.
The build order is strict:
predicate— OVL1: the robust predicate layer every overlay operation eventually calls (orientation, in-circle, segment-segment intersection, coordinate-range gate).- turn graph → traversal → output assembly → the four overlay free functions land in later phases, each behind the same strict ordering.
§Robustness
v1 uses exact input arithmetic with no rescale — the predicates
compute directly on the f64 inputs and the
predicate::range_guard refuses inputs outside the safe
arithmetic range rather than silently returning a wrong sign,
leaving a slot for a future rescale policy.
Re-exports§
pub use buffer::JoinStrategy;pub use buffer::PointStrategy;pub use buffer::buffer_convex_polygon;pub use buffer::buffer_point;pub use merge::merge_multipolygon;pub use merge::merge_polygons;pub use operation::OverlayError;pub use operation::difference;pub use operation::intersection;pub use operation::sym_difference;pub use operation::union_poly;pub use relate::De9im;pub use relate::Dimension;pub use relate::crosses;pub use relate::overlaps;pub use relate::relate as relate_matrix;pub use relate::touches;pub use surface_point::point_on_surface;pub use validity::ValidityFailure;pub use validity::is_valid_polygon;pub use validity::is_valid_ring;
Modules§
- assemble
- OVL4 — output assembly: turn traversed rings into a
MultiPolygon. - buffer
- OVL7 —
buffer: grow a geometry outward by a fixed distance. - merge
- OVL8 —
merge_elements: combine overlapping polygons via union. - operation
- OVL5 — the boolean overlay free functions.
- predicate
- OVL1 — the robust predicate layer.
- relate
- OVL6.T1 / OVL6.T2 — the DE-9IM relate matrix and the spatial predicates derived from it.
- surface_
point - OVL6.T3 —
point_on_surface. - traverse
- OVL3 — traversal: walk the turn graph to assemble output rings.
- turn
- OVL2 — the turn graph.
- validity
- OVL6.T4 —
is_validfor rings and polygons.