kcl →
patternTransform2d
Just like patternTransform, but works on 2D sketches not 3D solids.
patternTransform2d(total_instances: u32, transform_function: FunctionParam, solid_set: SketchSet) -> [Sketch]
Arguments
Name | Type | Description | Required |
---|---|---|---|
total_instances | u32 | Yes | |
transform_function | FunctionParam | Yes | |
solid_set | SketchSet | A sketch or a group of sketches. | Yes |
Returns
Examples
// Each instance will be shifted along the X axis.
fn transform(id) {
return { translate = [4 * id, 0] }
}
// Sketch 4 circles.
sketch001 = startSketchOn('XZ')
|> circle({ center = [0, 0], radius = 2 }, %)
|> patternTransform2d(4, transform, %)