Expand description
Intersection: where curves and surfaces meet.
The entry points, by what is being intersected:
intersect_surfaces: surface/surface, the oneogeom-boolbuilds on. Analytic closed forms where they exist, with exact same-parameter pcurves; the marching-and-fitting pipeline where they do not, with the tolerance reported as a sum of stated parts.intersect_curves_2d/intersect_curves: curve/curve in the plane and in space. The planar one is what boolean face splitting runs on; the spatial one reports the gap each crossing achieved, because space curves generically miss.intersect_curve_surface: curve/surface, the well-posed system, and what the point-in-solid classifier casts its rays with.
The stages underneath are public because each is separately measurable:
surface_surface (the closed forms), seeds/trace/branches
(the marcher), trace_tangential (a contact, where the surfaces touch
along a curve without crossing), approximate_branch (polyline to
curves).
§The instruments
The crate is held to instruments rather than trusted. They live in
tests/support/, because measuring an intersector is not something a
caller of one wants to do. What a caller wants is an intersector that has
been measured.
One scores accuracy: every point of every reported curve against both
surfaces, with ground truth being the surfaces themselves rather than
anyone else’s answer. The other scores completeness: the surfaces are
asked, by signed distance and the intermediate value theorem, where the
intersection must be, and every such cell had better be reached by some
branch. The second exists because the first cannot catch a missing answer:
an intersector that finds one circle of two and traces it perfectly scores
perfectly on accuracy alone. Both have negative controls in
tests/instruments.rs. They demonstrably fail when something is genuinely
missing.
Re-exports§
pub use approx::IntersectionCurve;pub use approx::approximate_branch;pub use contact::trace_tangential;pub use curve_surface::CurveSurfaceIntersection;pub use curve_surface::CurveSurfaceOptions;pub use curve_surface::Piercing;pub use curve_surface::PreparedSurface;pub use curve_surface::intersect_curve_surface;pub use curve_surface::touch_curve_surface;pub use curves::Crossing;pub use curves::CurveCurveOptions;pub use curves::CurveIntersection;pub use curves::Overlap;pub use curves::intersect_curves;pub use curves::intersect_curves_2d;pub use extrema::Approach;pub use extrema::Extrema;pub use extrema::ExtremaOptions;pub use extrema::extrema_curve_curve;pub use extrema::extrema_curve_surface;pub use extrema::extrema_surface_surface;pub use march::Contact;pub use march::Marching;pub use march::Stopped;pub use march::Traced;pub use march::branches;pub use march::branches_cut_at_poles;pub use march::cut_at_poles;pub use march::passes_a_pole;pub use march::seeds;pub use march::trace;pub use section::IntersectOptions;pub use section::ParameterWindow;pub use section::SectionCurve;pub use section::SurfaceIntersection;pub use section::exact_pcurve_of;pub use section::exact_pcurve_over;pub use section::intersect_surfaces;pub use section::intersect_surfaces_within;pub use surface::Meeting;pub use surface::drum_onto_plane;pub use surface::surface_surface;pub use walk::Condition;pub use walk::Walked;pub use walk::follow;pub use walk::walk_one_way;
Modules§
- approx
- The approximation stage: a traced branch becomes curves.
- contact
- Tangential contact: two surfaces that touch along a curve without crossing it.
- curve_
surface - Where a curve pierces a surface.
- curves
- Where two curves meet, in the plane and in space.
- extrema
- The stationary approaches between two geometries.
- march
- The general surface/surface intersector: seed, then walk.
- section
- Where two surfaces meet: the one call.
- surface
- Surface/surface intersection: the analytic cases.
- walk
- One walker, several conditions.
Functions§
- crosses_
extrusion_ rim - Whether
aandbare a plane and an extrusion of a B-spline profile whose control points’ heights to the plane straddle an end of the sweep: the pairplane_extrusion_at_rimsanswers, andintersect_surfacesleaves to the marcher. - plane_
extrusion_ at_ rims - Where a plane meets an extrusion of a B-spline profile whose heights to
the plane straddle an end of the sweep, the section split where it
crosses the rim there:
Nonefor any other pair, whichintersect_surfacesanswers as before, and where a crossing is not resolved cleanly.