plot3-plot3 [-v] [-S] < unix_plot > unix_plot
PLOT3-PLOT3(1)
NAME
plot3-plot3 - convert an extended UnixPlot file to a simple UnixPlot file
On this page
SYNOPSIS
DESCRIPTION
UnixPlot is a simple machine and device independent plotting file format found on both System V and BSD Unix systems. BRL-CAD has extended that format (plot3(5)) to include color, three dimensional plotting, machine independent floating point coordinates, and a flush command for interactive output.
plot3-plot3 reads an extended UnixPlot file on standard input and writes the simpler classic format to standard output for use by older, non-extended programs. It drops color and flush commands, strips the Z coordinate of 3D commands, and converts floating point coordinates to integer. By default, conversion to integer is done by simple truncation, clamped to the 16 bit signed integer range (-32767 to +32767).
If the -S option is given, the "space" command in the plot file is used to center and scale the plot to the full 16 bit signed integer plotting space. This is particularly useful for converting floating point files whose coordinates would otherwise be clamped. If no space command is present, a default space of -32767 to +32767 is assumed.
OPTIONS
- -v
-
Verbose. Print the name of each plot command on standard output as it is converted. Note that this intermixes the command names with the converted plot data on standard output.
- -S
-
Scale. Use the plot’s "space" command to center and scale the output to fill the full 16 bit signed integer plotting space, rather than simply truncating coordinates.
DIAGNOSTICS
A warning is issued if -S is given but the input contained no space command, in which case the default +/-32k space is used. A warning is also issued if the input contained space command(s) but -S was not given, since those commands are ignored without it.
EXAMPLES
rt -o model.pl -P1 model.g component.r
plot3-plot3 -S < model.pl > model2d.plot
Render a region to an extended BRL-CAD plot file with rt(1), then convert it to a classic 2D UnixPlot file, scaling the geometry to fill the available integer plotting space so nothing is clipped.
plot3-asc < model.pl
plot3-plot3 -v < model.pl > model2d.plot
Use plot3-asc(1) to dump the extended commands as ASCII, then run the conversion with -v to print each command name (on standard output, intermixed with the converted data) and confirm which 3D, floating point, and color commands are being reduced.
SEE ALSO
brlcad(1), plot3-asc(1), plot3-fb(1), plot3-ps(1), plot3rot(1), plot3color(1), libbv(3), plot3(5)
AUTHOR
BRL-CAD Team
COPYRIGHT
This software is Copyright (c) 1988-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