fence [options] -o output.g
FENCE(1)
NAME
fence - generate a chain-link fence in a BRL-CAD geometry database
On this page
SYNOPSIS
DESCRIPTION
fence generates a chain-link fence model and writes it to a BRL-CAD .g geometry database. The fence is built from RCC poles spaced along its length, joined by a zig-zagging wire mesh. Every parameter of the fence may be adjusted on the command line, including its overall dimensions, pole radius and spacing, wire radius and twist angle, object names, and per-component material and color.
There are no positional arguments; the output destination is set with -o (defaulting to fence.g). With no dimensional options the program uses its built-in defaults: a 3000mm long, 2000mm tall fence with 3000mm pole spacing, 30mm poles, and 2mm wire at a 45 degree twist, in millimeters. All dimensional values are interpreted in the units set with -u.
Most options come in a lowercase/uppercase pair. The lowercase letter sets a value directly; the uppercase letter either toggles a mode relative to its default, or applies the value to all fence components at once (poles, mesh, and wire) rather than to the fence combination alone.
The resulting database can be visualized or further edited with mged(1) and rendered with rt(1).
OPTIONS
- -i, -I
-
Enable (-i) or toggle (-I) interactive mode, prompting for parameters on standard input.
- -v, -V
-
Enable (-v) or toggle (-V) verbose mode.
- -d, -D
-
Enable (-d) or toggle (-D) debug mode.
- -o, -O filename
-
Output geometry database file name (default fence.g).
- -k, -K string
-
Title/identification string stored in the database header.
- -u, -U units
-
Units for the database and all dimensional values (e.g. mm, in); default mm.
- -n 'x y z', -N val
-
Fence height. -n takes a vector; -N takes a single scalar applied along +Z. May not be zero.
- -l 'x y z', -L val
-
Fence length (width). -l takes a vector; -L takes a single scalar applied along +X. May not be zero.
- -r radius
-
Radius of the mesh wires. May not be zero.
- -R radius
-
Radius of the fence poles. May not be zero.
- -a, -A angle
-
Primary angle, in degrees, of the wire zig-zag. May not be zero.
- -j, -J distance
-
Maximum spacing between poles. May not be zero.
- -t material, -T material
-
Shader/material name for the fence region (-t) or for every generated region (-T).
- -b parameters, -B parameters
-
Shader parameter string for the fence region (-b) or for every generated region (-B).
- -c 'r g b', -C 'r g b'
-
RGB color (each value 0-255) for the fence region (-c) or for every generated region (-C).
- -f, -F fencename
-
Base name of the fence object(s) in the database.
- -p, -P polename
-
Base name of the pole object(s).
- -m, -M meshname
-
Base name of the mesh object(s).
- -w, -W wirename
-
Base name of the wire object(s).
- -s, -S segmentname
-
Base name of the wire segment object(s).
- -e, -E fpmw
-
Select which components (f*ence, *p*ole, *m*esh, *w*ire) are prompted for in interactive mode. *-e sets the listed components; -E toggles them relative to their defaults.
- -g, -G fpm
-
Select which components (f*ence, *p*ole, *m*esh) to generate. *-g generates exactly the listed components; -G toggles them relative to their defaults.
- -x, -X
-
Print command-line usage examples and exit.
- -z, -Z
-
Print the default settings and exit.
- -h, -?
-
Print a usage message and exit.
EXAMPLES
fence -o yard.g -N 1800 -L 6000 -j 2000 -R 25 -r 2 -a 60 -C '90 90 90'
rt -o yard.png yard.g fence.r
Writes a 1.8m tall, 6m long fence to yard.g with poles spaced every 2m (25mm radius), 2mm mesh wire twisted at 60 degrees, and a gray color applied to all components. The second command renders the resulting fence.r region to an image with rt(1).
fence -o posts.g -g p -L 9000 -j 3000 -R 40
Generates just the line of poles (no mesh) for a 9m run with 3m spacing and 40mm radius, useful when the mesh is modeled separately or omitted.
SEE ALSO
brlcad(1), mged(1), rt(1), picket_fence(1)
AUTHOR
BRL-CAD Team
COPYRIGHT
This software is Copyright (c) 1989-2026 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