Editing BoT

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
The “Bag o’ Triangles” (BoT) is a BRL-CAD primitive object used for representing triangle mesh objects.  BoT objects may be surfaces or solids; topologically closed or open; clockwise, counter-clockwise, or unoriented; and with an optional global or per-face thickness for surfaces depending on the BoT mesh type.
 
The “Bag o’ Triangles” (BoT) is a BRL-CAD primitive object used for representing triangle mesh objects.  BoT objects may be surfaces or solids; topologically closed or open; clockwise, counter-clockwise, or unoriented; and with an optional global or per-face thickness for surfaces depending on the BoT mesh type.
  
= Determining the mode of a BoT =
+
== BoT types ==
 
 
Reading the 'mode' parameter in MGED will report the BoT mesh type:
 
 
 
mged> get YOUR_BOT_NAME mode
 
volume
 
mged> get YOUR_BOT_NAME orient
 
rh
 
 
 
That example shows that "YOUR_BOT_NAME" is a volume mode bot that has a right-hand (counter-clockwise) face orientation.
 
 
 
= BoT types =
 
  
 
There are four primary BoT mesh modes implemented in BRL-CAD:
 
There are four primary BoT mesh modes implemented in BRL-CAD:
  
# '''“surf” is a surface-only object with no volume information.'''<br><br>Rays hitting a surf object should return a hit with a zero-thickness.  Our obj, ply, and dxf importers presently create BoTs marked as this type.<br><br>
+
# “surf” is a surface-only object with no volume information. Rays hitting a surf object should return a hit with a zero-thickness.  Our obj, ply, and dxf importers presently create BoTs marked as this type.
# '''“volume” is an explicit solid object that is topologically closed and should enclose some non-zero volume of space.'''<br><br>Our proe export plugin; the stl, intaval, fastgen, and enf importers; and the make, inside, E, and facetize commands create BoTs marked as this type.<br><br>
+
# “volume” is an explicit solid object that is topologically closed and should enclose some non-zero volume of space. Our proe export plugin; the stl, intaval, fastgen, and enf importers; and the make, inside, E, and facetize commands create BoTs marked as this type.
# '''“plate” is an implicit solid object defined by a surface (which may or may not be topologically closed) and a specified thickness (similar to extrude).'''<br><br>There can be e either a global thickness or a per-face thickness.  The thickness is specified to either be centered about the surface (1/2 + 1/2 thickness) or a bidirectional extrusion distance (1 + 1 thickness).  The shotliner mimics FASTGEN’s raytrace behavior when encountering this type of BoT object.  Our fastgen and intaval converters create BoTs marked as this type.<br><br>
+
# “plate” is an implicit solid object defined by a surface (which may or may not be topologically closed) and a specified thickness (similar to extrude). There can be e either a global thickness or a per-face thickness.  The thickness is specified to either be centered about the surface (1/2 + 1/2 thickness) or a bidirectional extrusion distance (1 + 1 thickness).  The shotliner mimics FASTGEN’s raytrace behavior when encountering this type of BoT object.  Our fastgen and intaval converters create BoTs marked as this type.
# '''“plate_nocos” is a plate mode specialization that is identical in all respects except that shotlining ignores the obliquity angle.'''<br><br>This means that rays hitting this type of BoT return a segment distance equal to the BoT’s thickness regardless of the angle of intersection.  None of our tools directly generate this object type.<br><br>
+
# “plate_nocos” is a plate mode specialization that is identical in all respects except that shotlining ignores the obliquity angle. This means that rays hitting this type of BoT return a segment distance equal to the BoT’s thickness regardless of the angle of intersection.  None of our tools directly generate this object type.
  
 
The first three modes are exactly what one would expect in order to represent the variety of triangle meshes that are commonly created by other CAD systems.  The last mode, mode #4 (plate_nocose), is obviously a peculiar curiosity and prime for removal (in my opinion), but was undoubtedly added for some analysis customization.  Some investigative research would have to be performed if we decide to deprecate this mode type (if you’re someone using this mode type, please speak up).   
 
The first three modes are exactly what one would expect in order to represent the variety of triangle meshes that are commonly created by other CAD systems.  The last mode, mode #4 (plate_nocose), is obviously a peculiar curiosity and prime for removal (in my opinion), but was undoubtedly added for some analysis customization.  Some investigative research would have to be performed if we decide to deprecate this mode type (if you’re someone using this mode type, please speak up).   
Line 25: Line 14:
 
There’s also obviously not much difference between a #1 (surf) and a #3 (plate) with a zero thickness except the following: a) plates are defined as implicitly solid (by definition), b) surfaces are not solid (by definition), and c) there are a variety of plate mode raytrace behaviors implemented specifically to mimic FASTGEN behavior.
 
There’s also obviously not much difference between a #1 (surf) and a #3 (plate) with a zero thickness except the following: a) plates are defined as implicitly solid (by definition), b) surfaces are not solid (by definition), and c) there are a variety of plate mode raytrace behaviors implemented specifically to mimic FASTGEN behavior.
  
= BoT Advantages over STL =
+
== Determining the mode of a BoT ==
  
There are three primary advantages to using BoTs in BRL-CAD instead of STL:
+
Reading the 'mode' parameter will report the BoT mesh type:
  
# '''STL only supports one object per file.'''<br><br>This can be worked around (by managing multiple files), but BRL-CAD inherently supports an arbitrary number of objects per file that can be easily grouped together as needed ensuring that common components stay grouped together.<br><br>
+
mged> get YOUR_BOT_NAME mode
# '''STL equivalently only implements surfaces (what we call "surf" mode) with no regard to topology, connectivity, or closure.'''<br><br>You can write code to assume the geometry is well connected and/or encloses a volume and that a ray that enters a face will exit some other face(s), but nothing in the format requires it. This can impact analysis validity and verifiability.  Our “volume” mode BoTs are specifically tailored for analysis purposes, requiring that the mesh be topologically connectable and closed.<br><br>
+
volume
# '''STL only supports single-precision floating point.'''<br><br>We support both single- and double-precision in BRL-CAD, defaulting to double-precision for supporting detailed models more accurately.  This can also impact analysis validity, particularly for highly complex models, where error can accumulate and compound more rapidly with single-precision data. Double-precision does necessarily use more memory, twice as much, but doesn't generally have a meaningful performance impact.<br><br>
+
  mged> get YOUR_BOT_NAME orient
 +
  rh
  
STL is definitely in wider use but only because it is basically a lowest common denominator “dumb” format with no structure.  Going from most any format to STL is almost always a lossy conversion.
+
That example shows that "YOUR_BOT_NAME" is a volume mode bot that has a right-hand (counter-clockwise) face orientation.

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)
Retrieved from "https://brlcad.org/wiki/BoT"