Skip to main content

Crate geop_core_sketch

Crate geop_core_sketch 

Source
Expand description

2-D constraint sketches: points, lines, arcs, circles and splines, the typical CAD constraints between them, a BFGS solver, and conversion of the solved sketch into closed profiles for extrude and revolve.

Re-exports§

pub use profile::ProfileEdge;
pub use profile::ProfileJoint;
pub use profile::ProfileLoop;
pub use profile::ProfilePiece;
pub use profile::Region;
pub use sketch::Constraint;
pub use sketch::ConstraintId;
pub use sketch::Curve;
pub use sketch::CurveId;
pub use sketch::CurveKind;
pub use sketch::Point;
pub use sketch::PointId;
pub use sketch::Positions;
pub use sketch::Sketch;
pub use solve::SolveReport;

Modules§

bfgs
A dense BFGS minimizer with a backtracking (Armijo) line search.
dual
Forward-mode automatic differentiation for constraint residuals.
geometry
The geometry of sketch entities, generic over [Scalar] so every formula serves both the residuals (differentiated with crate::dual::Dual) and plain evaluation (profiles, rendering).
profile
Turning a solved sketch into profiles: closed loops of curves grouped into regions (an outer loop with its holes), and those loops into the NURBS curves that extrude and revolve consume.
sketch
Sketch entities and constraints: plain f64 design data.
solve
Solving a sketch: every constraint contributes residuals that are zero exactly when it holds, and crate::bfgs::minimize drives the sum of their squares to zero.