BOT_EXTRUDE(nged)

Generate a volumetric BoT to explicitly represent the volume claimed by plate mode BoT.

πŸ“… published 7.44.0, from nixpkgs unstable

okay so bestie, this is BOT_EXTRUDE(nged) β€” the nged page from the BRL-CAD User Commands set, and it's literally all about making a volumetric BoT out of a plate mode BoT πŸŽ€βœ¨

✨ NAME ✨

bot_extrude β€” generate a volumetric BoT to explicitly represent the volume claimed by a plate mode BoT. periodt πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

bot extrude [-h] [-q] [-i] [-R] [-C] [-F] {input_bot} [output_bot]

🌸 DESCRIPTION 🌸

Given a BoT solid that's using plate mode to implicitly define a volume, this command generates an explicit volumetric BoT that approximately represents the same volume. The default mode is to produce a BoT, but if you'd rather get a CSG tree of implicit shapes, that output can be generated with -C. (Usually the resulting tree is quite large, because it uses one primitive for every mesh element, and typically -C is recommended only for debugging.) Note that the volumetric representation produced 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 you wish 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 it 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 you 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 you're willing to accept the differences between the original and a volumetric approximation, you may instruct bot extrude to proceed with the -F option. 😭

πŸ’… OPTIONS πŸ’…

  • -h|β€”help β€” prints help and exits. πŸ‘‹
  • -q|β€”quiet β€” suppresses messages reporting the status of the generation process. 🀫
  • -i|β€”in-place β€” replaces the input BoT with the generated volumetric output. (Destructive.) πŸ’€
  • -R|β€”round-edges β€” represents outer edges of a plate mode BoT with cylindrical approximations. πŸŽ€
  • -C|β€”comb β€” returns a CSG tree of implicit shapes rather than an evaluated BoT. 🌳
  • -F|β€”force β€” produces 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 β€” the standard case, bestie. πŸ’–

Example 1. Basic example.

mged>bot extrude input.bot output.bot

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

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

Example 2. Batch conversion of plate mode BoTs.

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

This 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. no cap πŸ’…

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” iconic, periodt. 🫢

πŸ› BUG REPORTS πŸ›

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. don't be shy, bestie πŸ’Œ


and that's the whole page β€” footer source/version: BRL-CAD; footer page: BOT_EXTRUDE(nged); no date line to report β€” so we're signing off with that iconic footer vibe πŸ’…βœ¨

πŸ“¦ where this page comes from