Skip to content

Commit

Permalink
Document convenient syntax for fj::Transform
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Oct 11, 2022
1 parent a9d5afd commit 0c0c6c1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crates/fj/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c0c6c1

Please sign in to comment.