Skip to main content

Module algorithms

Module algorithms 

Source
Expand description

Geometry algorithms.

Re-exports§

pub use delaunay_triangulation::Triangulation;
pub use delaunay_triangulation::delaunay_triangulation;
pub use convex_hull::Hull3D;
pub use convex_hull::convex_hull_2d;
pub use convex_hull::convex_hull_3d;
pub use convex_hull::convex_polygon_contains_2d;
pub use convex_hull::polygon_area_2d;
pub use slicing::Contour;
pub use slicing::slice_mesh;
pub use slicing::slice_mesh_levels;
pub use rotations::Axis;
pub use rotations::EulerSequence;
pub use rotations::Matrix3;
pub use rotations::Rotation2;
pub use rotations::Rotation3;
pub use quaternions::Quaternion;
pub use nearest_point_finding::Closest;
pub use nearest_point_finding::closest_point_on_aabb;
pub use nearest_point_finding::closest_point_on_line;
pub use nearest_point_finding::closest_point_on_mesh;
pub use nearest_point_finding::closest_point_on_plane;
pub use nearest_point_finding::closest_point_on_polygon_boundary;
pub use nearest_point_finding::closest_point_on_polyline;
pub use nearest_point_finding::closest_point_on_ray;
pub use nearest_point_finding::closest_point_on_segment;
pub use nearest_point_finding::closest_point_on_sphere;
pub use nearest_point_finding::closest_point_on_triangle;
pub use nearest_point_finding::closest_points_between_segments;
pub use nearest_point_finding::distance_point_to_line_3d;
pub use intersection::Intersection2D;
pub use intersection::TriangleHit;
pub use intersection::aabb_aabb;
pub use intersection::circle_circle;
pub use intersection::line_line_2d;
pub use intersection::line_plane_parameter;
pub use intersection::plane_plane;
pub use intersection::ray_aabb;
pub use intersection::ray_plane;
pub use intersection::ray_sphere;
pub use intersection::ray_triangle;
pub use intersection::segment_plane;
pub use intersection::segment_segment_2d;
pub use intersection::segment_triangle;
pub use intersection::sphere_sphere;
pub use intersection::triangle_plane;
pub use kd_trees::KdTree;
pub use kd_trees::PeriodicKdTree;
pub use alignment::Alignment;
pub use alignment::ProcrustesResult;
pub use alignment::align_vectors;
pub use alignment::geometric_slerp;
pub use alignment::orthogonal_procrustes;
pub use alignment::procrustes;
pub use alignment::rotation_mean;
pub use hausdorff::DirectedHausdorff;
pub use hausdorff::directed_hausdorff;
pub use hausdorff::hausdorff_distance;
pub use oct_trees::OctTree;
pub use region_tree::RegionTree;
pub use quad_trees::QuadTree;
pub use voronoi::VoronoiDiagram;
pub use voronoi::polygon_signed_area;
pub use voronoi::voronoi_diagram;
pub use mesh_processing::boundary_vertices;
pub use mesh_processing::decimate;
pub use mesh_processing::laplacian_smoothing;
pub use mesh_processing::taubin_smoothing;
pub use mesh_processing::vertex_neighbours;
pub use polygon_boolean::BooleanOperation;
pub use polygon_boolean::point_in_polygon;
pub use polygon_boolean::polygon_boolean;

Modules§

alignment
Fitting rotations to data, following scipy.spatial: the rotation that best aligns two sets of vectors (Rotation.align_vectors, the Kabsch or Wahba problem), the mean of rotations (Rotation.mean), orthogonal Procrustes analysis (procrustes, orthogonal_procrustes), and interpolation along great circles (geometric_slerp).
convex_hull
Convex hulls of point sets in two and three dimensions.
delaunay_triangulation
Delaunay triangulation of 2D point sets.
hausdorff
The Hausdorff distance between point sets (SciPy’s scipy.spatial.distance.directed_hausdorff).
hull_nd
Convex hulls, Delaunay triangulations and Voronoi diagrams in any dimension, half-space intersections and Voronoi diagrams on the sphere, following scipy.spatial (which wraps Qhull): ConvexHullNd, DelaunayNd, VoronoiNd, HalfspaceIntersection and SphericalVoronoi.
intersection
Intersection tests and constructions between common primitives.
kd_trees
k-d trees for nearest-neighbour and range queries in D dimensions.
mesh_processing
Triangle mesh smoothing and decimation, on indexed meshes (vertices, triangles).
nearest_point_finding
Closest-point queries: the point of a primitive nearest to a query point.
oct_trees
Oct trees: point region trees in 3D.
polygon_boolean
Boolean operations on simple polygons by the Greiner-Hormann algorithm.
quad_trees
Quad trees: point region trees in the plane.
quaternions
Unit quaternions for representing and composing 3D rotations.
region_tree
A point region tree: the shared engine behind quad trees (D = 2) and oct trees (D = 3).
rotations
Rotations in two and three dimensions: matrices, axis-angle, Euler sequences, and composable rotation types.
slicing
Slicing triangle meshes with planes into contours.
voronoi
Voronoi diagrams of 2D point sets, as the dual of the Delaunay triangulation.