Expand description
Sketch documents, constraint solving, interaction state, and overlay geometry.
Re-exports§
pub use doc::SketchConstraint;pub use doc::SketchDiagnostics;pub use doc::SketchDoc;pub use doc::SketchGeometry;pub use doc::SketchPoint;pub use external_ref::classify_uv;pub use external_ref::EdgeLink;pub use external_ref::ExternalRef;pub use session::constraint_ref;pub use session::entity_ref_eq;pub use session::geometry_ref;pub use session::point_ref;pub use session::refs_equal;pub use session::SketchSession;pub use solve::SketchSolverSettings;pub use tessellate::SketchTessellation;
Modules§
- constraint_
glyphs - Screen-sized line-art glyphs for geometric constraints.
- dimensions
- Dimension leaders and labels for distance, point-line distance, angle, radius, and diameter constraints.
- doc
- Typed sketch JSON shared with the 2D constraint solver.
- external_
ref - Project solid edges into a sketch as fixed construction references.
- handdraw
- Recognize freehand strokes as lines, circles, arcs, or cubic Beziers.
- infer
- Infer coincidence or point-on-line constraints after a single-point drag.
- session
- A sketch’s solved document, plane, diagnostics, and interaction state.
- solve
- Solve wiring — call the kernel’s 2D constraint solver in-process.
- spline
- Insert spline anchors by de Casteljau subdivision without changing the curve.
- tessellate
- Tessellate solved sketch geometry into world-space overlay lines and points.
- trim
- Trim sketch geometry between sampled-polyline intersections around the click.
Structs§
- Plane
Frame - An orthonormal placement frame for a sketch plane — origin + in-plane
x/yaxes + theznormal, all in world space (f64). A plane(u, v)coordinate maps to worldorigin + u·x + v·y(viato_world).
Functions§
- ray_
plane_ uv - Intersect a world-space ray (
origin+dir) with a sketchplaneand return the hit’s in-plane(u, v)coordinate, orNonewhen the ray is parallel to the plane (|dir·n| < 1e-9) or the hit is behind the ray origin (t <= 0).