The file format was invented by Brigham Young University for geometric
surface shapes in 3D space. It is a very classic format specified in the 70s but
still used in CAD systems.
These files use fixed format, i.e. fixed length for all variables.
First line of the file:
nparts npoints npolys nconnects ntest
nparts
- number of parts of a geometry, each is a separate surface in the same
file
npoints
- total number of coordinate vectors in Rū
npolys
- number of patches, (a triangle, a quadrilateral are all single patches
e.g.)
nconnects
- number of connectivity entries (that is for triangles only: 3 *
npolys)
ntest
- should be 0
Next lines specify boundaries of the parts, i.e. the position of
the first and
last entry of the part in the connectivity list of the file
first1 last1
first2 last2
...
Next lines specify the coordinate vectors in Rū off all
coordinates:
Each row has six numbers (that is two points) each one with twelve digits
(like shown below) inclusive blanks and right-aligned.
Next lines specify the indices of the coordinates in the coordinate vector
that make up a patch, and this for each patch of the whole surface.
Here every line must have 16 entries with each one six digits (also inclusive
blanks and right-aligned). The last connectivity entry
of such a patch has negative sign to indicate the end of the patch.
This allows patches of arbitrary number of edges, but it's better to use
triangles,
otherwise an automatic triangulation algorithm would be invoked.