Skip to main content

linear_pattern

Function linear_pattern 

Source
pub fn linear_pattern(
    topo: &mut Topology,
    solid: SolidId,
    direction: Vec3,
    spacing: f64,
    count: usize,
) -> Result<CompoundId, OperationsError>
Expand description

Create a linear pattern of a solid.

Produces count copies of the solid, each offset from the previous by spacing along direction. The original solid is included as the first element.

Returns a compound containing all copies.

ยงErrors

Returns an error if count < 1, spacing is non-positive, the direction is zero-length, or copy/transform fails.