2. Pertinent Characteristics of the BRL-CAD Format
1. CSG vs. BREP
As mentioned previously, there are two basic approaches to solid modeling: CSG and BREP. In CSG modeling, an object is represented as a Boolean combination of simple primitive shapes (e.g., spheres, cylinders, cones, etc.). In BREP modeling, an object is represented by a set of surfaces (e.g., facets, triangles, and splines) that are "stitched" together to completely enclose the object.
For example, as shown in CSG and BREP approaches to representing an extrusion die (Tanenbaum, 2001)., to geometrically represent a simple extrusion die used in material manufacturing, a CSG model might subtract a cone from a cylinder to achieve the desired shape. Alternatively, a BREP model might achieve the same shape by joining several surfaces (Tanenbaum, 2001).
image::foo.eps[]
Most of the major commercial solid modeling packages currently in distribution (e.g., Pro/ENGINEER [commonly known as Pro/E], Unigraphics, etc.) use the BREP approach, although they do have some CSG capability. BRL-CAD, on the other hand, is primarily a CSG modeling system with some BREP capability.
Conversions that occur between CSG and BREP typically involve their "lowest common denominator".
For BRL-CAD, a simple type of BREP is available in the form of triangles; it is called the Bag of Triangles (BOT) primitive. If the BREP object consists of all triangles, the BRL-CAD representation can be an exact duplicate. But more often, a BREP object consists of smooth, curved surfaces, meaning the BRL-CAD triangle representation will be an approximation of the object. Note that this approximation may be made as close to the true surface as desired, but at the cost of more, smaller triangles (see [_fig_bot]) (Tanenbaum, 2001). Thus, the higher degree of smoothness means the greater the impact on file size and performance of any application trying to employ all the triangles.
Because most commercial CAD systems have the capability to produce
tessellated approximations of their BREP objects, some converters to
BRL-CAD (e.g., those with Pro/E and Unigraphics) take advantage of
these capabilities. In addition, the previously mentioned STL format,
which represents solid objects entirely with triangles, offers the
community a universal (albeit crude) way to convert BRL-CAD geometry
(via the g-stl
converter) to nearly any commercial CAD system.
image::test_img.eps[]
In the end, although there are benefits to using the BREP methodology (e.g., ease of use, software availability/compatibility, etc.), BRL-CAD developers and vulnerability analysts have found CSG modeling to be the best approach in terms of model accuracy, storage efficiency, precision, and analysis speed.
2. Prerelease 6.0 Database vs. Current Format
With the release of BRL-CAD 6.0, an entirely new BRL-CAD database format was introduced. Additional capabilities provided by the new format include unlimited name lengths, object attributes, machine independence (for IEEE floating point architectures), reduced disk space requirements, opaque binary objects, and the capability to hide objects. (For more information on the new database format, see Butler et al. [2003]).
Older BRL-CAD databases may be upgraded to the current database (db)
format using the dbupgrade
utility. To execute this command, the
user types the following command at the command-line prompt:
dbupgrade
oldformat.g currentformat.g
This command reads an existing input.g database (in the older format)
and writes a new output.g in the latest format. Remember that all
BRL-CAD geometry files are designated by a .g
suffix. Thus, the
conversion commands discussed in the following sections use a g
to
represent the BRL-CAD file format (e.g., asc2g
, dxf-g
, g-acad
,
etc.).
3. Converters Currently Available in BRL-CAD
CAD Format | Import Capability? | Export Capability? |
---|---|---|
ACAD |
N |
Y |
ASCII |
Y |
Y |
AutoCAD DXF |
Y |
Y |
Elysium Neutral Facetted |
Y |
N |
EUCLID [1] |
Y |
Y |
FASGEN |
Y |
N |
IGES |
Y |
Y |
Jack |
Y |
Y |
NASTRAN |
Y |
N |
Pro/E |
Y |
N |
STL |
Y |
Y |
TANKILL |
Y |
Y |
Unigraphics |
Y |
N |
Viewpoint |
Y |
N |
VRML |
N |
Y |
Wavefront (.obj) |
N |
Y |
X3D |
N |
Y |