PLOT3-PLOT3(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

🌸 NAME 🌸

plot3-plot3 β€” convert an extended UnixPlot file to a simple UnixPlot file. This is the BRL-CAD manual page PLOT3-PLOT3(1), bestie, and yes it's literally the glow-down machine for plots. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so you run it like this, no cap:

plot3-plot3 [-v] [-S] < unix_plot > unix_plot

✨ DESCRIPTION ✨

Okay so first the lore: 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. Iconic behavior, honestly. πŸ‘‘

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's giving "make it compatible with the ancient plotter." 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). Yes, the whole range, bestie. πŸ™ˆ

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. (So if you're like "why is my plot file also a gossip session?" that's why. 😭)
  • -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. Slay. πŸ’…

🚨 DIAGNOSTICS 🚨

Warning time, bestie: 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. Not me forgetting the flag... lowkey a vibe check fail. πŸ™ˆ

🧚 EXAMPLES 🧚

Example 1. Flatten a 3D BRL-CAD plot for a classic plotter

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. Obsessed with a clean conversion. ✨

Example 2. Inspect commands while down-converting

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. Main character debugging energy, fr fr. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

🫢 AUTHOR 🫢

BRL-CAD Team. Legends. πŸ’œ

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. ngl, do not gatekeep the bugs, bestie. 😀


source/version: BRL-CAD Β· manual: PLOT3-PLOT3(1) Β· date info: copyright years 1988-2026 (no separate footer date printed, bestie). periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from