From 7f1bba7e981ec373796a82f0871f86861f9fd814 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 11 Oct 2022 14:50:55 +0200 Subject: [PATCH] Document convenient syntax of `fj::Sweep` --- crates/fj/src/sweep.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/fj/src/sweep.rs b/crates/fj/src/sweep.rs index 5e13cd078..14b805ebb 100644 --- a/crates/fj/src/sweep.rs +++ b/crates/fj/src/sweep.rs @@ -1,6 +1,18 @@ use crate::{Shape, Shape2d}; /// A sweep of a 2-dimensional shape along straight path +/// +/// # 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::Shape2d` +/// let group = shape.sweep([0., 0., 1.]); +/// ``` #[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[repr(C)]