Document convenient syntax for fj::Group

This commit is contained in:
Hanno Braun 2022-10-11 14:48:44 +02:00
parent 58eaff523f
commit 8a231eee91

View File

@ -5,6 +5,19 @@ use crate::Shape;
/// A group is a collection of disjoint shapes. It is not a union, in that the /// 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. /// 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 /// # Limitations
/// ///
/// Whether the shapes in the group touch or overlap is not currently checked. /// Whether the shapes in the group touch or overlap is not currently checked.