Skip to main content

ogeom_mesh/
lib.rs

1//! Tessellation. Discretize edges to a deflection tolerance, then build a
2//! constrained Delaunay triangulation in each face's (u,v) parametric domain,
3//! refine it, and attach the result to the face.
4//!
5//! Uses `spade` for CDT and refinement rather than ear-clipping: ear-clipping offers
6//! no quality guarantees and cannot insert Steiner points, which curved surfaces
7//! need.
8//!
9//! Also the spatial indexes over meshes and point clouds that inspection
10//! asks of them: [`Bvh`] over triangles and [`PointIndex`] over points,
11//! the sections of a mesh by planes ([`section()`]), and the shadow it casts
12//! on one ([`shadow()`]), traced by the exact planar region engine in
13//! [`planar`], and its curvature at each vertex ([`curvature()`]).
14
15pub mod attach;
16pub mod boolean;
17pub mod bvh;
18pub mod curvature;
19pub mod discretize;
20pub mod editable;
21pub mod hatch;
22pub mod hollow;
23pub mod parity;
24pub mod planar;
25pub mod point_index;
26pub mod section;
27pub mod shadow;
28pub mod simplify;
29mod tails;
30pub mod thicken;
31pub mod triangulate;
32
33pub use attach::{Tessellated, polyline_of, tessellate, triangulation_of};
34pub use boolean::{BoolKind, MeshBoolean, boolean, boolean_with_shape};
35pub use bvh::{Bvh, Hit};
36pub use curvature::{Curvature, NEIGHBOURS, curvature};
37pub use discretize::{
38    Deflection, Polyline, discretize, discretize_on_surface, discretize_planar, is_straight,
39    is_straight_planar,
40};
41pub use editable::{
42    Cap, Component, CutReport, Editable, Fairing, Fill, FillReport, OFFSET_EDGE_ANGLE,
43    OFFSET_FARTHEST, OPTIMAL_UP_TO, OffsetReport, PASSES, Rim, RimId, Side, SimplifyReport, Smooth,
44    SmoothReport,
45};
46pub use hatch::hatch_face;
47pub use hollow::{Grid, Hollowed, hollow};
48pub use parity::{Lies, Line};
49pub use planar::{Edge2, Loop2, region};
50pub use point_index::{Neighbour, PointIndex};
51pub use section::{Chain, Section, section, sections};
52pub use shadow::shadow;
53pub use simplify::{Deviation, Simplified, Target, simplify};
54pub use thicken::{Thicken, Thickened, thicken};
55pub use triangulate::{
56    EdgeChords, FaceMesh, FaceMeshCache, edge_chords_for, face_boundary, face_boundary_in_chart,
57    face_boundary_in_chart_met, face_meshes_for, inside_boundary, inside_boundary_with,
58    open_chart_ring, polyline_of_edge, triangulate, triangulate_face, triangulate_face_kept,
59    triangulate_face_with, triangulate_with_chords, triangulate_with_face_meshes,
60};