Document convenient syntax for fj::Transform

This commit is contained in:
Hanno Braun 2022-10-11 14:55:46 +02:00
parent a9d5afdcbd
commit 0c0c6c155f

View File

@ -2,6 +2,19 @@ use crate::{Angle, Shape};
/// A transformed 3-dimensional shape
///
/// # Examples
///
/// Convenient syntax for this operation is available through [`crate::syntax`].
///
/// ``` rust
/// # let shape = fj::Sketch::from_points(vec![[0., 0.], [1., 0.], [0., 1.]]);
/// use fj::syntax::*;
///
/// // `shape` can be anything that converts to `fj::Shape`
/// let rotated = shape.rotate([0., 0., 1.], fj::Angle::from_rev(0.5));
/// let translated = shape.translate([1., 2., 3.]);
/// ```
///
/// # Limitations
///
/// Transformations are currently limited to a rotation, followed by a