Skip to main content

Crate ogeom_mesh

Crate ogeom_mesh 

Source
Expand description

Tessellation. Discretize edges to a deflection tolerance, then build a constrained Delaunay triangulation in each face’s (u,v) parametric domain, refine it, and attach the result to the face.

Uses spade for CDT and refinement rather than ear-clipping: ear-clipping offers no quality guarantees and cannot insert Steiner points, which curved surfaces need.

Also the spatial indexes over meshes and point clouds that inspection asks of them: Bvh over triangles and PointIndex over points, the sections of a mesh by planes (section()), and the shadow it casts on one (shadow()), traced by the exact planar region engine in planar, and its curvature at each vertex (curvature()).

Re-exports§

pub use attach::Tessellated;
pub use attach::polyline_of;
pub use attach::tessellate;
pub use attach::triangulation_of;
pub use boolean::BoolKind;
pub use boolean::MeshBoolean;
pub use boolean::boolean;
pub use boolean::boolean_with_shape;
pub use bvh::Bvh;
pub use bvh::Hit;
pub use curvature::Curvature;
pub use curvature::NEIGHBOURS;
pub use curvature::curvature;
pub use discretize::Deflection;
pub use discretize::Polyline;
pub use discretize::discretize;
pub use discretize::discretize_on_surface;
pub use discretize::discretize_planar;
pub use discretize::is_straight;
pub use discretize::is_straight_planar;
pub use editable::Cap;
pub use editable::Component;
pub use editable::CutReport;
pub use editable::Editable;
pub use editable::Fairing;
pub use editable::Fill;
pub use editable::FillReport;
pub use editable::OFFSET_EDGE_ANGLE;
pub use editable::OFFSET_FARTHEST;
pub use editable::OPTIMAL_UP_TO;
pub use editable::OffsetReport;
pub use editable::PASSES;
pub use editable::Rim;
pub use editable::RimId;
pub use editable::Side;
pub use editable::SimplifyReport;
pub use editable::Smooth;
pub use editable::SmoothReport;
pub use hatch::hatch_face;
pub use hollow::Grid;
pub use hollow::Hollowed;
pub use hollow::hollow;
pub use parity::Lies;
pub use parity::Line;
pub use planar::Edge2;
pub use planar::Loop2;
pub use planar::region;
pub use point_index::Neighbour;
pub use point_index::PointIndex;
pub use section::Chain;
pub use section::Section;
pub use section::section;
pub use section::sections;
pub use shadow::shadow;
pub use simplify::Deviation;
pub use simplify::Simplified;
pub use simplify::Target;
pub use simplify::simplify;
pub use thicken::Thicken;
pub use thicken::Thickened;
pub use thicken::thicken;
pub use triangulate::EdgeChords;
pub use triangulate::FaceMesh;
pub use triangulate::FaceMeshCache;
pub use triangulate::edge_chords_for;
pub use triangulate::face_boundary;
pub use triangulate::face_boundary_in_chart;
pub use triangulate::face_boundary_in_chart_met;
pub use triangulate::face_meshes_for;
pub use triangulate::inside_boundary;
pub use triangulate::inside_boundary_with;
pub use triangulate::open_chart_ring;
pub use triangulate::polyline_of_edge;
pub use triangulate::triangulate;
pub use triangulate::triangulate_face;
pub use triangulate::triangulate_face_kept;
pub use triangulate::triangulate_face_with;
pub use triangulate::triangulate_with_chords;
pub use triangulate::triangulate_with_face_meshes;

Modules§

attach
Storing a tessellation back onto the model.
boolean
Booleans between closed triangle meshes, decided exactly.
bvh
A bounding-volume hierarchy over a triangle mesh: the nearest triangle to a point, every triangle within a ball, and the first triangle along a ray.
curvature
The curvature of a triangle mesh at its vertices, read from a local quadric fitted to the vertices about each one.
discretize
Turning a curve into a polyline within a stated deflection.
editable
An indexed triangle mesh held for editing, with the topology queries edits need: which faces meet across each edge, the connected pieces, and the open rims.
hatch
Hatching in parametric space: parallel lines clipped to a face’s trim.
hollow
Hollowing a closed mesh: a sealed cavity inside it, its wall a set distance from the part’s surface.
parity
Inside or outside a closed mesh, by the parity of its crossings along a line parallel to x.
planar
Regions of the plane bounded by weighted chains of segments, found robustly: the engine under shadow and the outline fit’s offsets.
point_index
A k-d tree over a point cloud: the nearest point, the k nearest, and every point within a ball.
section
Sections of a triangle mesh by a plane: polylines that know which side the material is on.
shadow
The shadow a triangle mesh casts on a plane: the outline of everything it covers seen along the plane’s normal, with its holes.
simplify
Decimating a triangulation.
thicken
Thickening an open mesh into a closed one: two offset layers of it joined by a wall along each rim.
triangulate
Triangulating a face.