Program Structure
The program asks for a .WRL file and for a name of the .SAT file to generate.
The program will be composed by two main parts:
1) A parser (read .WRL file). This parser will recognize the following:
- Rigid body transformations: Translation and rotation
- Material (Color) in RGB format
- Basic VRML primitives: Sphere, Cube, Cone and Cylinder
- Point definitions
- Polyhedra: IndexedFaceSet
This parser will not allow some exceptions in the input file, for example: having too many spaces between data, or carriage returns between data points, etc. It will work with a somewhat rigid input, which doesn't differ so much from .WRL anyway, this format does not allow too many exceptions. The reason for not working as much on this, is to keep on focus in the problem. This would require a long time to cover all exceptions, and it's not worth the effort.
2) A .SAT generator (write
.SAT file). This is divided in two:
- Basic primitive generator:
This handles three basic primitives: cone, cylinder and sphere each as
a separated exception case.
- Polyhedron generator: This
takes the polyhedron data and generates the entire structure for a .SAT
file.
ACIS defines solids very similarly to boundary-based models. An ACIS basic solid or polyhedron consists of the following basic elements:
- Body
- Shell
- Lump (if it’s a real solid)
- Wire (if it’s just a wireframe)
- Faces
- Loops
- Edges
- Coedges
- Vertices
- Points

The entities marked with p are points, v stands for vertices, e for edges, f for faces, l for loops, and c for coedges. We give ACIS a point definition, and it assigns vertices to each point as the physical entities associated with these. These vertices define the edges, which have 2 associated coedges each. These coedges define loops, which define faces. Joining these faces together using the edge definition gives us a shell, and this shell defines a solid. The lump just specifies if it’s a solid with volume, if it’s not, then it’s a wireframe, and is composed by a wire.
Having the solid, we can apply rigid-body operations, such as translation, and rotation. These are defined in a transformation matrix. And finally we can apply a color, which is given in RGB format. Both rigid-body transformations and color are associated to the solid.