mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-17 21:56:21 +00:00
Document convenient syntax for fj::Transform
This commit is contained in:
parent
a9d5afdcbd
commit
0c0c6c155f
@ -2,6 +2,19 @@ use crate::{Angle, Shape};
|
|||||||
|
|
||||||
/// A transformed 3-dimensional 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
|
/// # Limitations
|
||||||
///
|
///
|
||||||
/// Transformations are currently limited to a rotation, followed by a
|
/// Transformations are currently limited to a rotation, followed by a
|
||||||
|
Loading…
Reference in New Issue
Block a user