From 8a231eee9199874b0d023d38b8605a1e204f799d Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 11 Oct 2022 14:48:44 +0200 Subject: [PATCH] Document convenient syntax for `fj::Group` --- crates/fj/src/group.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/fj/src/group.rs b/crates/fj/src/group.rs index 8bcdf2389..d675e2761 100644 --- a/crates/fj/src/group.rs +++ b/crates/fj/src/group.rs @@ -5,6 +5,19 @@ use crate::Shape; /// A group is a collection of disjoint shapes. It is not a union, in that the /// shapes in the group are not allowed to touch or overlap. /// +/// # Examples +/// +/// Convenient syntax for this operation is available through [`crate::syntax`]. +/// +/// ``` rust +/// # let a = fj::Sketch::from_points(vec![[0., 0.], [1., 0.], [0., 1.]]); +/// # let b = fj::Sketch::from_points(vec![[2., 0.], [3., 0.], [2., 1.]]); +/// use fj::syntax::*; +/// +/// // `a` and `b` can be anything that converts to `fj::Shape` +/// let group = a.group(&b); +/// ``` +/// /// # Limitations /// /// Whether the shapes in the group touch or overlap is not currently checked.