Holes, fins, teeth, feet, slats and steps are the same object many times. Rig Cad has four repeat nodes for that, and the choice between them is the difference between a model that resizes cleanly and one where the fifth hole falls off the edge. This article covers Linear, Radial, Parametric and Path Repeat, the derived-pitch habit that keeps arrays inside their host, and the one-child rule that keeps them cheap.
Four repeat nodes and two references
Table: Repeat and reference nodes under Operations 2D/3D and Other.
| Node | Copies | Controls | Reach for it when |
|---|---|---|---|
| Linear Repeat | A grid along X, Y and Z | countX/Y/Z, spacingX/Y/Z, centerX/Y/Z, sdfRepeatMode |
Identical copies on a straight line or grid |
| Radial Repeat | A ring about an axis | count, angle, axis, sdfRepeatMode |
Bolt circles, spokes, fins, petals |
| Parametric Repeat | N copies that can each differ | count; instance.i, instance.count, instance.t in the child's expressions |
Staircases, tapered fins, graduated holes |
| Path Repeat | Copies along a path or a weighted point field | fieldOrient, alignToPath |
Pickets, beads, features on a rail or scattered sites |
| Instance | A linked reference to another node's subtree | Its own transform plus per-parameter overrides | The same sub-assembly placed several times with different values |
| Assembly | A reusable subtree with published inputs | Assembly Instance binds values per placement | A component library inside one project |
All four repeats are polymorphic: give one a single closed 2D profile and it tiles or rings that profile in 2D and emits a path, which is the fact the next section is built on. Give it a solid and it produces solids joined by a union.
Repeat in 2D, extrude once
The perforated plate in the demo never contains fifteen cylinders. It contains one circle, tiled in 2D, subtracted from a rectangle in 2D, extruded once.
Diagram: The plate tree. One extrude on top of a 2D difference whose children are the plate outline and a linear repeat of a single hole circle.
flowchart TD
E["Perforated_Plate (extrude)"] --> D["Plate_Profile (difference)"]
D --> R["Plate_Outline (rectangle)"]
D --> G["Hole_Grid (linear_repeat, countX = holesX, countY = holesY)"]
G --> H["Hole (circle, radius = holeDiameter / 2)"]That is cheaper than fifteen 3D subtractions by a wide margin, it cannot produce the coplanar-face artefacts that 3D cutters can, and the mesh is a clean prism. Sketches to Solids covers the 2D boolean rules this depends on.
The pitch is not typed in. It is derived from the plate so the outermost holes always sit margin from the edge:
pitchX = (plateWidth - 2 * margin - holeDiameter) / max(holesX - 1, 1)
pitchY = (plateHeight - 2 * margin - holeDiameter) / max(holesY - 1, 1)
The max(..., 1) guards a single-hole row against dividing by zero, and centerX/centerY on the repeat keep the grid symmetric about the plate's origin. Resize the plate, change the count, change the margin: the holes stay inside. The webCheck readout reports min(pitchX, pitchY) - holeDiameter, the material between neighbours, because a count that fits the edges can still leave no web at all.
Radial repeats around a boss
The finned boss is a Union of a cylinder and a Radial Repeat of one box. The box is positioned at bossRadius + (finLength + 1) / 2 - 1 so it overlaps the boss by a millimetre and the union fuses cleanly; a fin that only touches the boss produces a coincident face and, on some inputs, a non-manifold seam. count is bound to finCount, angle stays at 360 for a full ring, and axis is Z because the boss stands on the build plate.
A Radial Repeat rotates its copies as it places them, so the fin's long axis always points outward. For features that must keep their orientation while circling, a Path Repeat along a circle with orientation off is the alternative.
Parametric Repeat: when every copy differs
A Linear Repeat makes identical copies. When the copies should change along the run, Parametric Repeat makes count copies of its one child and exposes three values inside that child's expressions: instance.i, the zero-based index; instance.count; and instance.t, which runs from 0 to 1 across the set.
The staircase is one box:
options.depth = stepRise * (instance.i + 1)
transform.position.x = instance.i * stepRun
Each copy is one rise taller and one run further along. A tapered fin uses instance.t in a width expression; graduated drill holes use it in a radius. The repeat's own transform centres the run with -(stepCount - 1) * stepRun / 2, so the staircase grows about its middle when stepCount changes.
instance.* resolves only while the worker expands the copies. The Variables panel and the expression tester report instance as unknown, so test the arithmetic with a literal index and then bind it. The rest of the grammar is in Expressions and Variables.
Three rules that keep repeats honest
Repeat complete features, not their pieces. A bolt is a head, a shaft and a thread; build it once as a union and repeat the union. Separate repeats for heads and shafts drift apart the first time a count changes, and cost twice the solves.
One child with a variable count, never N hand-placed siblings. Five copies repositioned by a count expression is a dead count: the sixth never appears. If the copies really are different objects rather than variations of one, they are not a repeat.
Use repeats for symmetric pairs, not the Mirror step. The Mirror post-processing step reflects a node about a plane through that node's own origin. Applied to a feature that is centred in its own frame, it reflects the feature onto itself and silently changes nothing; applied where the halves meet at the plane it manufactures slivers along the seam. A Linear Repeat with countX 2 and a spacing expression is the construction that survives a resize, and it is what the Transforms article recommends for the same reason.
Repeats also multiply cost. Five by five copies of a 10,000-triangle child is 250,000 triangles before the union joins them, which is one of the rows in Why Is My Model Slow?. Inside an SDF branch, sdfRepeatMode offers domain repetition, which evaluates the field once per cell instead of unioning copies, and infinite, which needs a bounding parent to produce finite output.
Where to go next
The organizer tray in Beyond Sliders is a repeat whose count and spacing are order inputs, with the validation that goes around them. The OpenSCAD for loop maps onto these nodes in Rig Cad for OpenSCAD Users. And when the repeated thing is a lattice cell rather than a feature, that is the domain repetition inside Pattern 3D.
Comments
Loading comments...