CLONE(nged)
Deep-copy an object (optionally in a geometric pattern) and place the copies in the database with automatically generated names.
π
CLONE β the nged glow-up edition β¨
Okay bestie, buckle up β clone lives in the nged manual, and it's honestly iconic. It deep-copies an object (optionally in a geometric pattern) and places the copies in the database with automatically generated names. Copy-paste but make it fashion. π¦
πΈ NAME πΈ
clone β deep-copy an object (optionally in a geometric pattern) and place the copies in the database with automatically generated names. No cap, that's the whole vibe.
β¨ SYNOPSIS β¨
clone [pattern] [options]... {object}...
The optional positional pattern keyword selects the geometric layout of the produced copies:
linβ linear (single-axis) β this is the default πrectβ rectangular gridsphβ spherical patterncylβ cylindrical pattern
The pattern keyword may appear anywhere on the command line; option position relative to it does not matter. Omitting the keyword is literally identical to using lin. Periodt.
π DESCRIPTION π
The clone command creates new database objects by copying an existing object hierarchy and placing the copies in a regular spatial pattern. It can produce a simple linear series, a rectangular grid, or radial layouts on spherical and cylindrical coordinate systems. It's giving assembly line but make it geometry. π₯
π§ AXIS-AWARE OPTIONS π§
Each pattern publishes a fixed list of axes that any of the four axis-keyed options below operate on:
linβsteprectβx,y,zsphβaz,el,rcylβaz,r,h
These axis names are the only per-shape vocabulary you have to learn. Each of the four options below accepts either a bare value (which becomes the default for every axis whose attribute is otherwise unset) or an AXIS=value form (which binds to that axis only). All four are repeatable; later occurrences override earlier ones. Yes bestie, override is the main character.
-n,--copiesN | AXIS=N β number of copies along the named axis (or every axis when bare).-d,--deltaD | AXIS=D β step size between copies along the axis. Degrees forazandel; model-space distance otherwise.--startV | AXIS=V β starting value for the named axis. Defaults to0for non-angular axes; defaults to-90Β°for theelaxis (south pole) so that a single elevation produces a layer at the equator only when explicitly set. That detail matters, don't skip it π.--listAXIS=v1 v2... β provide an explicit list of values for the named axis. Overrides-n,-d, and--startfor that axis. Only theAXIS=form is accepted. No bare values here, sorry queen.
π SPATIAL & ORIENTATION OPTIONS π
-O,--originx y z β pattern origin in model space. Per-pattern interpretation, so pay attention:lin: starting position offset (no-op when0,0,0).rect: grid origin.sph: centre of the sphere.cyl: centre of the cylinder base.
-p,--pivotx y z β pivot point baked into each copy when any rotation is applied β that is-rinlin, or--aligninsph/cyl. Defaults to the model origin(0,0,0). Inlinmode, this option doubles as the legacy rotation centre for-r(formerly--rpoint). Throwback moment π.--alignKEYS β comma-separated list of orientation keys. Each copy is rotated so that the listed direction(s) follow its position. Valid keys per pattern:sph:az(yaw to azimuth),el(pitch to elevation).cyl:az(yaw β also accepts the aliastan).lin,rect: not applicable.
--dirAXIS x y z β direction vector for the named axis. Defaults:rect:xβ(1,0,0),yβ(0,1,0),zβ(0,0,1).sph:azβ(1,0,0)reference forazimuth=0.cyl:azβ(1,0,0);hβ(0,0,1)(cylinder axis).lin:stepaxis (overrides the direction implied by-t).
π HOUSEKEEPING OPTIONS π
-h,--helpβ display help and exit. Our little safe space π«Ά.-i,--increment# β increment used when generating copy names. The first numeric run found in each source name is incremented by this value; if no number is present the increment is appended. Default100.-c,--second-numberβ move the naming cursor to the next numeric run in object names. May be repeated for the third, fourth, etc. number. Repeatable queen π.--depthtop|regions|primitives β controls how deeply the copy hierarchy is constructed. Default istopfor any pattern that produces more than one copy,primitivesfor the single-copy linear case.topβ wrapper combination, source geometry shared.regionsβ every combination down to (and including) the first region copied; primitives shared.primitivesβ full recursive deep copy, placement matrix baked in.
--xpushβ before producing the final clone, flatten any matrices that hang above the combination members of the source object.-g,--groupname β collect the produced clones into a top-level combination called name.-s,--subssstr rstr β substitute the first occurrence of sstr with rstr in every generated object name.
π LINEAR-ONLY (FROZEN) OPTIONS π
The compact short forms below are accepted only in lin mode. They exist so that any rel-7-42-2 invocation continues to parse identically. Frozen in time, still slaying. π§
-t,--translatex y z β per-copy translation vector. Equivalent to--dir step x y z -d step |x y z|.-r,--rotatex y z β per-copy rotation in degrees about the X, Y, Z axes (in that order). Replaced by--alignin pattern modes.-a,--atransn x y z β total translation x y z, split over n copies. Equivalent to-n n -t x/n y/n z/n.-b,--arotn x y z β total rotation x y z in degrees, split over n copies.-m,--mirroraxis d β mirror the source about the plane perpendicular to axis (x,y, orz) at distance d.
π EXAMPLES π
Example 1. Clone an object into a rectangular 4x3 array.
mged>clone rect -n x=4 -d x=9000 -n y=3 -d y=6000 rib.s
Creates twelve copies of rib.s arranged in a 4 by 3 grid, which is useful for repeated structural parts, bolt patterns, or ribs. Twelve ribs, twelve vibes. β¨
Linear (the original behaviour):
clone -n 4 -t 100 0 0 widget # 4 copies along X, 100 apart
clone -a 4 100 0 0 widget # equivalent
clone -m x 0 widget # mirror about the YZ plane
Rectangular grid:
clone rect -n 3 -d 100 widget # 3Γ3Γ3 grid, 100 apart
clone rect -n x=4 -d x=9000 -n y=3 -d y=6000 widget # 4Γ3 grid in XY plane
Spherical pattern:
clone sph -n az=8 -d az=45 -n el=3 -d el=30 \
--start el=-60 -n r=1 -d r=9000 widget
clone sph -n az=4 -d az=90 -n r=1 -d r=300 --align az widget
Cylindrical pattern:
clone cyl -n az=8 -d az=45 -n r=1 -d r=7000 \
-n h=3 -d h=7000 widget
clone cyl -n az=4 -d az=90 -n r=1 -d r=300 \
-n h=2 -d h=200 --align az widget
The pattern keyword position is irrelevant:
clone -n 4 rect -d 100 widget # equivalent to:
clone rect -n 4 -d 100 widget
Lowkey the most freeing thing about this command: the keyword can go anywhere and it just works. Vibe check passed. β
π AUTHOR π
BRL-CAD Team β icons, honestly.
π COPYRIGHT π
This software is Copyright (c) 1995-2025 by the United States Government as represented by U.S. Army Research Laboratory.
π¦ BUG REPORTS π¦
Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>
Okay that's the whole page, bestie β and if you made it this far, you officially understand clone better than most people understand their own group chats. Go forth and duplicate responsibly. πΈ
β sign-off from the BRL-CAD girlies, page CLONE(nged), no date drama because we're timeless π
π«Ά
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms