BOT_EXTRUDE nged BRL-CAD BRL-CAD User Commands
bot_extrude Generate a volumetric BoT to explicitly represent the volume claimed by plate mode BoT.
`bot_extrude` -h -q -i -R -C -F input_bot output_bot

## DESCRIPTION

Given a BoT solid using "plate" mode to implicitly define a volume, generate an explicit volumentric BoT to approximately represent the same volume. The default mode is to produce a BoT, but if the user prefers a CSG tree of implicit shapes that output can be generated with `-C`. (Usually the resulting tree is quite large, since it uses one primitive for every mesh element, and typically `-C` is recommended only for debugging.) Note that the volumetric representation produces will typically not be an exact match to the original plate mode volume - cylinders are used to "fill in" mesh edges and this can produce small artifacts at outer vertex points. Typically, especially with small thickness values for plates, these artifacts are not significant - the "cylinders" themselves are also facetized approximations of the "thickness volume" claimed by edges. Just as spheres are approximated by a triangle mesh when facetized, a plate mode's "volume" is approximated when extruded.

In order to avoid being destructive, the output produced must normally be written out to a different object name than that of the input BoT. However, if the user wishes to replace a large number of plate mode BoTs in a CSG hierarchy, the `-i` option may be used to instruct the `bot extrude` command to replace the original input with the generated output. This IS destructive, but also avoids the need to edit all of the comb entries referencing the original primitives. Users should only perform a `-i` extrusion on an expendable copy of the original .g file until they are sure the result is satisfactory.

By default outer edges of a plate mode BoT are not represented by cylinders. This is generally the intuitive expectation, but arguably the half cylinder at the outer edge could be considered volume claimed by the plate mode bot, depending on the incoming ray angle. If the user DOES wish to "round" the outer edges of the conversion with cylinders, the `-R` option will apply those cylinders in the conversion process.

The most problematic plate mode BoTs to represent as volumes are those with view dependent behavior - i.e., those with "face_mode" set. In the strict sense such objects do not claim a well defined volume in space - in/out hit points and partitions will change for the same intersecting line segment depending on what direction the ray is coming from. By default `bot extrude` will warn and exit when encountering such volumes, but if the user is willing to accept the differences between the original and a volumetric approximation they may instruct `bot extrude` to proceed with the `-F` option.

## OPTIONS

-h|--help

  Print help and exit.

-q|--quiet

  Suppress messages reporting the status of the generation process.

-i|--in-place

  Replace the input BoT with the generated volumetric output. (Destructive.)

-R|--round-edges

  Represent outer edges of plate mode BoT with cylinderical approximations.

-C|--comb

  Return a CSG tree of implicit shapes rather than an evaluated BoT.

-F|--force

  Produce a volumetric BoT output even if the input BoT's parameters indicate it is a view dependent solid.

## EXAMPLES

Generate a volumetric BoT from a plate mode BoT (standard case.)

Basic example.

mged> `bot extrude input.bot output.bot`

Represents all triangle elements in input.bot with CSG implicits, approximates them with triangles, and unions them together to produce output.bot.

For a more advanced use, we combine `bot extrude` with `search -exec` to batch convert a large number of plate mode BoTs.

Batch conversion of plate mode BoTs.

mged> `search -type bot -type plate -exec "bot extrude -F --in-place {}" ";"`

Uses the `--in-place` to replace plate mode BoTs in the .g file with their volumetric approximations. The `-F` option instructs `bot extrude` to proceed even if the BoT is view dependent.

## AUTHOR

BRL-CAD Team

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org