Skip to main content

ogeom_algo/
lib.rs

1//! Shape construction and query: everything that does not require surface/surface
2//! intersection.
3//!
4//! *Elsewhere:* the `BRepBuilderAPI`, `BRepPrimAPI`, `BRepTools`,
5//! `BRepLib`, `BRepGProp`, `BRepCheck`, `BRepClass3d`, `BRepExtrema`, `GeomAPI`,
6//! `GCPnts` and `GProp` families, plus the classical curve constructors.
7//! The adaptor layer is `ogeom-geom`'s: evaluating topology as geometry
8//! belongs with the geometry traits (`docs/PARITY.md`, geom.adaptors).
9//!
10//! Every operation in this crate emits history (`generated` / `modified` /
11//! `is_deleted`) from the start. That is not optional and cannot be retrofitted:
12//! downstream stable naming is built directly on it.
13
14mod bins;
15pub mod build;
16pub mod check;
17pub mod classify;
18pub mod convert;
19pub mod fit;
20pub mod history;
21pub mod length;
22pub mod mass;
23mod mass_chart;
24pub mod measure;
25pub mod medial;
26pub mod medial_graph;
27pub mod mesh_solid;
28pub mod pcurve_fit;
29pub mod place;
30pub mod primitive;
31pub mod project_plane;
32pub mod proximity;
33pub mod recognize;
34pub mod sew;
35pub mod sweep;
36pub mod text;
37pub mod tight;
38
39pub use build::{
40    attach_pcurve, attach_seam, chain_wire_branches, edge_vertices, find_plane, is_shell_closed,
41    is_wire_closed, make_apex_band, make_band_between, make_compound, make_compsolid, make_edge,
42    make_edge_between, make_face, make_face_on, make_face_with_pcurves, make_natural_face,
43    make_polygon, make_revolution_band, make_shell, make_solid, make_vertex, make_wire,
44    rings_are_parallels, surface_iso_u_curve,
45};
46pub use check::{
47    Diagnosis, Problem, Severity, check, check_self_intersection, check_tessellation,
48    restore_containment,
49};
50pub use classify::{
51    Containment, SolidBoundary, classify_in_solid, classify_in_solid_exact,
52    classify_in_solid_exact_banded, classify_on_face,
53};
54pub use convert::{
55    CurveRestatement, SurfaceRestatement, baked_shape, general_transformed_shape, normals_oppose,
56    restate_geometry, to_nurbs, to_nurbs_within,
57};
58pub use fit::{Spacing, approximate, approximate_within, interpolate};
59pub use history::{Built, History};
60pub use length::{curve_length, parameter_at_length, points_by_count, points_by_spacing};
61pub use mass::{MassProperties, linear_properties, surface_properties, volume_properties};
62pub use measure::{
63    Obb, Projection, SurfaceProjection, SurfaceSeeds, curve_bounds, face_normal, oriented_bounds,
64    project_on_curve, project_on_planar_curve, project_on_surface, project_on_surface_from,
65    relative_deflection, shape_bounds, surface_bounds, vertex_bounds, widened_to_hold,
66};
67pub use medial::{MedialAxis, medial_axis};
68pub use medial_graph::{MedialBranch, MedialGraph, MedialSite, MedialVertex, medial_graph};
69pub use mesh_solid::{MeshSolid, MeshSolidOptions, MeshSolidReport, solid_from_mesh};
70pub use place::{copied, transformed};
71pub use primitive::{
72    make_box, make_cone, make_cylinder, make_half_space, make_hexahedron, make_parallelepiped,
73    make_polyhedron, make_sphere, make_torus, make_wedge,
74};
75pub use project_plane::{ProjectedCurve, project_edge_onto_plane};
76pub use proximity::{ClosestPair, ShapeDistance, distance_between_shapes};
77pub use recognize::{Canonical, Recognized, recognize_points};
78pub use sew::{Sewn, make_wire_unordered, order_edges, sew};
79pub use sweep::{make_prism, make_prism_tapered, make_revolution};
80pub use text::make_text;
81pub use tight::tight_bounds;