Files
modeling-app/docs/kcl/patternLinear3d.md
Adam Chalmers 1efc2b9762 KCL: Pattern repetitions now pattern instances (#4162)
Josh Gomez requests pattern calculations take the total number of instances,
not the number of extra repetitions to do. This is how we designed the
patternTransform API, but we didn't do that for patternLinear/Circular.
2024-10-15 13:25:03 -07:00

58 KiB

title, excerpt, layout
title excerpt layout
patternLinear3d Repeat a 3-dimensional solid along a linear path, with a dynamic amount manual

Repeat a 3-dimensional solid along a linear path, with a dynamic amount

of distance between each repetition, some specified number of times.

patternLinear3d(data: LinearPattern3dData, solid_set: SolidSet) -> [Solid]

Arguments

Name Type Description Required
data LinearPattern3dData Data for a linear pattern on a 3D model. Yes
solid_set SolidSet A solid or a group of solids. Yes

Returns

[Solid]

Examples

exampleSketch = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line([0, 2], %)
  |> line([3, 1], %)
  |> line([0, -4], %)
  |> close(%)

example = extrude(1, exampleSketch)
  |> patternLinear3d({
       axis: [1, 0, 1],
       instances: 7,
       distance: 6
     }, %)

Rendered example of patternLinear3d 0