omdl  v0.9.8
OpenSCAD Mechanical Design Library
Repeat

Shape repetition tools. More...

+ Collaboration diagram for Repeat:

Files

file  repeat.scad
 Shape repetition tools.
 

Functions

module repeat_radial (n, r=1, o=0, angle=true, move=false)
 Radially repeat copies of child objects about a z-axis radius. More...
 
module repeat_grid (g, i, c=1, center=false)
 Repeat copies of child objects about a Cartesian grid. More...
 

Detailed Description

Shape repetition tools.

Requires:
include <omdl-base.scad>;
Repeat
III
repeat_grid()
repeat_radial()

Function Documentation

◆ repeat_grid()

module repeat_grid ( ,
,
= 1,
center  = false 
)

Repeat copies of child objects about a Cartesian grid.

Parameters
g<integer-list-3 | integer> The grid division count. A list [x, y, z] of integers or a single integer for (x=y=z).
i<decimal-list-3 | decimal> The grid increment size. A list [x, y, z] of decimals or a single decimal for (x=y=z).
c<integer> The number of copies. Number of times to iterate over children.
center<boolean> Center distribution about origin.

The child objects are repeated individually c times about the grid g with grid spacing increments i.

Warning
Only immediate children are handled individually as shown in the following example. Children that are produced by intermediate operation, such as object generated by a for loop, will be treated as a single child object.

Object example

repeat_grid( g=[5,5,4], i=10, c=50, center=true ) {cube(10, center=true); sphere(10);}
module repeat_grid(g, i, c=1, center=false)
Repeat copies of child objects about a Cartesian grid.
Definition: repeat.scad:509
repeat_grid

Definition at line 508 of file repeat.scad.

+ Here is the call graph for this function:

◆ repeat_radial()

module repeat_radial ( ,
= 1,
= 0,
angle  = true,
move  = false 
)

Radially repeat copies of child objects about a z-axis radius.

Parameters
n<integer> The number of equally spaced radii.
r<decimal> The radial move distance.
o<decimal> The rotational angular offset.
angle<boolean> Rotate each copy about z-axis.
move<boolean> Move each shape copy to radii coordinate.

All child objects are repeated together n times about the z-axis at radius r.

Object example

repeat_radial( n=7, r=6, move=true ) square( [20,1], center=true );
module repeat_radial(n, r=1, o=0, angle=true, move=false)
Radially repeat copies of child objects about a z-axis radius.
Definition: repeat.scad:462
repeat_radial

Definition at line 461 of file repeat.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: