Skip to main content

Crate ogeom_algo

Crate ogeom_algo 

Source
Expand description

Shape construction and query: everything that does not require surface/surface intersection.

The adaptor layer is ogeom-geom’s: evaluating topology as geometry belongs with the geometry traits.

Every operation in this crate emits history (generated / modified / is_deleted): downstream stable naming is built directly on it.

Re-exports§

pub use build::attach_pcurve;
pub use build::attach_seam;
pub use build::belted_wire;
pub use build::chain_wire_branches;
pub use build::closed_at_poles;
pub use build::covers_whole_surface;
pub use build::edge_vertices;
pub use build::edges_turn;
pub use build::find_plane;
pub use build::is_shell_closed;
pub use build::is_wire_closed;
pub use build::make_apex_band;
pub use build::make_band_between;
pub use build::make_band_of_rings;
pub use build::make_compound;
pub use build::make_compsolid;
pub use build::make_edge;
pub use build::make_edge_between;
pub use build::make_face;
pub use build::make_face_on;
pub use build::make_face_with_pcurves;
pub use build::make_natural_face;
pub use build::make_polygon;
pub use build::make_profile_revolution_band;
pub use build::make_revolution_band;
pub use build::make_shell;
pub use build::make_solid;
pub use build::make_vertex;
pub use build::make_wire;
pub use build::placed_edge_curve;
pub use build::rings_are_parallels;
pub use build::split_ring_on_column;
pub use build::surface_iso_u_curve;
pub use build::trimmed_or_fitted_where_bare;
pub use certify::HalfSpaces;
pub use certify::Uncertified;
pub use certify::certify_face_within;
pub use check::Diagnosis;
pub use check::Problem;
pub use check::Severity;
pub use check::chart_breaks;
pub use check::check;
pub use check::check_kept;
pub use check::check_self_intersection;
pub use check::check_self_intersection_near;
pub use check::check_tessellation;
pub use check::inside_out_faces;
pub use check::inside_out_faces_kept;
pub use check::restore_containment;
pub use classify::Containment;
pub use classify::ProbeCache;
pub use classify::SolidBoundary;
pub use classify::SolidMesh;
pub use classify::classify_in_solid;
pub use classify::classify_in_solid_exact;
pub use classify::classify_in_solid_exact_banded;
pub use classify::classify_on_face;
pub use convert::CurveRestatement;
pub use convert::SurfaceRestatement;
pub use convert::baked_shape;
pub use convert::baked_where_placed;
pub use convert::general_transformed_shape;
pub use convert::normals_oppose;
pub use convert::restate_geometry;
pub use convert::to_nurbs;
pub use convert::to_nurbs_within;
pub use extend::Extension;
pub use extend::extend_face;
pub use fit::Spacing;
pub use fit::approximate;
pub use fit::approximate_within;
pub use fit::interpolate;
pub use history::Built;
pub use history::History;
pub use history::on_own_nodes;
pub use history::on_own_nodes_with;
pub use history::unshare;
pub use length::curve_length;
pub use length::parameter_at_length;
pub use length::points_by_count;
pub use length::points_by_spacing;
pub use mass::MassProperties;
pub use mass::linear_properties;
pub use mass::surface_properties;
pub use mass::volume_properties;
pub use measure::Obb;
pub use measure::Projection;
pub use measure::curve_bounds;
pub use measure::face_normal;
pub use measure::oriented_bounds;
pub use measure::project_on_curve;
pub use measure::project_on_planar_curve;
pub use measure::relative_deflection;
pub use measure::shape_bounds;
pub use measure::surface_bounds;
pub use measure::vertex_bounds;
pub use measure::widened_to_hold;
pub use medial::MedialAxis;
pub use medial::medial_axis;
pub use medial_graph::MedialBranch;
pub use medial_graph::MedialGraph;
pub use medial_graph::MedialSite;
pub use medial_graph::MedialVertex;
pub use medial_graph::medial_graph;
pub use mesh_solid::FallbackReason;
pub use mesh_solid::FitConstraints;
pub use mesh_solid::MeshRegion;
pub use mesh_solid::MeshRegions;
pub use mesh_solid::MeshSolid;
pub use mesh_solid::MeshSolidOptions;
pub use mesh_solid::MeshSolidReport;
pub use mesh_solid::RegionFallback;
pub use mesh_solid::RegionId;
pub use mesh_solid::RegionRefusal;
pub use mesh_solid::SurfaceKind;
pub use mesh_solid::refine_solid;
pub use mesh_solid::single_precision_quantum;
pub use mesh_solid::solid_from_mesh;
pub use network::Across;
pub use network::ChainedPatch;
pub use network::CurveDef;
pub use network::IrregularCorner;
pub use network::LoopSide;
pub use network::Network;
pub use network::NetworkOptions;
pub use network::PatchDef;
pub use network::PatchFit;
pub use network::PatchSide;
pub use network::fit_loop_quads;
pub use network::fit_network;
pub use network::fit_network_chained;
pub use out_and_back::Notch;
pub use out_and_back::OutAndBack;
pub use out_and_back::edge_uses;
pub use out_and_back::is_tail;
pub use out_and_back::notch_of;
pub use out_and_back::out_and_back;
pub use out_and_back::placed_edge_uses;
pub use outline::Outline;
pub use outline::Piece2;
pub use outline::Wire2d;
pub use outline::fit_outline;
pub use pcurve_gap::edge_pcurve_gap;
pub use pcurve_gap::edges_apart;
pub use pcurve_gap::pcurve_gap;
pub use pcurve_gap::state_pcurve_gaps;
pub use pcurve_gap::state_pcurve_gaps_of;
pub use place::copied;
pub use place::transformed;
pub use pole::pole_crossings;
pub use primitive::make_box;
pub use primitive::make_cone;
pub use primitive::make_cylinder;
pub use primitive::make_faceted_solid;
pub use primitive::make_faceted_solid_with_holes;
pub use primitive::make_half_space;
pub use primitive::make_hexahedron;
pub use primitive::make_parallelepiped;
pub use primitive::make_polyhedron;
pub use primitive::make_sphere;
pub use primitive::make_torus;
pub use primitive::make_wedge;
pub use primitive::torus_face_seamed_at;
pub use project_plane::ProjectedCurve;
pub use project_plane::project_edge_onto_plane;
pub use proximity::ClosestPair;
pub use proximity::PointDistance;
pub use proximity::ShapeDistance;
pub use proximity::distance_between_shapes;
pub use recognize::Canonical;
pub use recognize::Recognized;
pub use recognize::recognize_points;
pub use segments_2d::Segment2;
pub use segments_2d::Segments;
pub use segments_2d::fit_segments_2d;
pub use sew::Agreement;
pub use sew::Sewn;
pub use sew::agreeing_orientation;
pub use sew::make_wire_unordered;
pub use sew::order_edges;
pub use sew::sew;
pub use sew::sew_around;
pub use sew::sew_around_within;
pub use sew::sew_within;
pub use sheet::SheetDistortion;
pub use sheet::SheetMethod;
pub use sheet::SheetPlacement;
pub use sheet::SurfaceSheet;
pub use sweep::make_prism;
pub use sweep::make_prism_tapered;
pub use sweep::make_revolution;
pub use text::make_text;
pub use thickness::Thickness;
pub use thickness::thickness;
pub use thickness::thickness_of_shape;
pub use tight::face_bounds;
pub use tight::tight_bounds;
pub use volume_difference::Form;
pub use volume_difference::Material;
pub use volume_difference::Region;
pub use volume_difference::volume_difference;

Modules§

build
Building topology from geometry.
certify
Proving that a face lies within a region bounded by planes.
check
Checking a shape against the model’s invariants.
classify
Where a point sits relative to a shape.
convert
Whole-shape conversion: everything as NURBS, and general affine transforms over a shape.
derived
Whether a read of a shape made from the reads kept of other shapes holding the same faces (ogeom_topo::Model::kept_reads) is checked against the same read made afresh: always in a debug build, and in any build inside derived_reads_checked, with the test-hooks feature.
distance
Signed distances from many points to a mesh or a shape.
extend
Growing a face past one of its boundary edges.
fit
Fitting a B-spline to points.
history
What an operation did to its inputs.
length
Arc length, and distributing points along a curve by it.
mass
Mass properties: how much there is, where its centre is, and how it resists being spun.
measure
Bounding volumes and projection.
medial
The medial axis of a planar region: the locus of centres of maximal inscribed circles: what tool-path generation and midline extraction are built on.
medial_graph
The medial axis of any planar face: holes, reflex corners and curved boundaries included, each branch its exact bisector.
mesh_solid
A B-rep solid from a triangle mesh.
network
A network of B-spline patches fitted to a scan at once.
orient
Directions and frames read off a mesh.
out_and_back
Where a face’s boundary runs out along a path and straight back along it.
outline
An outline of lines, arcs and circles fitted around a silhouette, clear of it by a play and within a tolerance band.
pcurve_fit
Pcurves fitted by projection, for faces whose trims have no closed form.
pcurve_gap
How far an edge’s pcurves stand off its curve, and edges’ tolerances raised to cover it.
place
Placing and duplicating shapes.
pole
Degenerate edges restored where a face’s boundary crosses a pole.
primitive
Primitive solids.
project_plane
An edge projected orthogonally onto a plane, as an exact curve in the plane’s own coordinates.
proximity
Minimum distance between shapes.
recognize
Canonical recognition: deciding that a set of points is a plane, a cylinder, a cone, a sphere or a torus, not that it resembles one.
register
Rigid registration: the rotation and translation that best carry one set of points onto another, onto a mesh, or a part onto its own mirror image.
segments_2d
A chain of lines and arcs fitted to a 2D polyline within a tolerance.
sew
Joining loose topology: ordering a bag of edges into a wire, and sewing free faces into a shell.
sheet
A flat sheet laid onto a face: the chart from the plane to the face’s surface that carries a sketch onto it.
sweep
Sweeping: dragging a shape through space to make one of higher dimension.
text
Text to wires: a built-in single-stroke engraving font.
thickness
Wall thickness at many points of a mesh or a shape, by rays or by inscribed spheres.
tight
The smallest axis-aligned box that holds a shape: how big a body is.
traced
Curves fitted through a trace at its own parameters and held to their tolerance between the samples.
volume_difference
The volume between a scanned mesh and the solid it was made to: the material the solid has and the scan lacks, and the material the scan has beyond the solid, as connected regions.

Structs§

ChartCrossing
A point where a face’s boundary crosses itself in its surface’s chart.
SelfCrossing
A point where a solid’s boundary passes through itself.
SurfaceProjection
Where a point projects onto a surface.
SurfaceSeeds
A surface’s seeding structure, built once and asked many times.

Enums§

Cutoff
Which points a fit keeps.

Functions§

chart_crossings
Every place where the boundary of face crosses itself in its surface’s chart, as the module documentation describes, in the order of the edges crossing. Nothing where an edge of the face has no pcurve on its surface: what cannot be drawn is not read.
join_seam_columns
Make a seam of every edge that holds its column on a closed surface as plain pcurves where the surface’s faces walk it twice, once each way, on two columns a period apart: two faces joined along the surface’s seam, or one face going round it. Returns how many edges were made seams.
project_on_surface
The nearest point on a surface to target.
project_on_surface_from
The nearest point on a surface to target, starting from a guess.
self_crossings
The pairs of faces of solid that pass through each other, a face folding through itself among them, one point for each: what check reports as a boundary crossing itself.