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.
sketch: the entities and constraints (plainf64design data).solve:Sketch::solve/Sketch::solve_with_drag.profile:Sketch::regionsandProfileLoop::to_nurbs.
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
Scalarso every formula serves both the residuals (differentiated withcrate::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
f64design data. - solve
- Solving a sketch: every constraint contributes residuals that are zero
exactly when it holds, and
crate::bfgs::minimizedrives the sum of their squares to zero.