Skip to documentation
DocumentationAll documentsEnglish

RPATCH(1)

NAME

rpatch - reformat FASTGEN files for input to patch-g

On this page

SYNOPSIS

rpatch [-D] [-3] < fastgen_input_file > file.rp

DESCRIPTION

rpatch is a pre-processor that reformats FASTGEN target description files into the column-aligned record format expected by patch-g(1), which performs the actual conversion into a BRL-CAD geometry database. It reads a FASTGEN file from standard input and writes the reformatted records to standard output. Each input record is parsed by fixed-width FORTRAN-style column fields, the packed solid type code is decomposed into separate type, thickness, and space-code values, and the result is re-emitted in the space-delimited layout that patch-g(1) reads.

OPTIONS

-D

Treat type 3 components as donuts rather than triangles.

-3

Interpret the input as FASTGEN3 format, in which the coordinate fields are each 10 columns wide (the default layout uses narrower 8- and 9-column coordinate fields).

EXAMPLES

Example 1. Convert a FASTGEN model into a BRL-CAD database
rpatch < model.fastgen > model.rp
patch-g -f model.rp model.g

The first command reformats the raw FASTGEN file into the intermediate .rp record format; the second feeds that file to patch-g(1) to produce the BRL-CAD geometry database model.g. Add -3 to the rpatch invocation when the source file is in FASTGEN3 format.

DIAGNOSTICS

The diagnostics are intended to be self-explanatory.

SEE ALSO

brlcad(1), mged(1), patch-g(1)

AUTHOR

John R. Anderson

This software is Copyright (c) 1994-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