next up previous index
Next: 3.2 Position Information Up: 3 Implementation Previous: 3 Implementation

3.1 Volume Information

The tree decoding routine transfers the volume information during decoding to the relevant shape routine which writes the volumes into the SET file. Every different shape has its own routine. For example, the simplest shape, BOX, is written in the SET format as follows:

,N1,:5,2#60,X,Y,Z
@302,N2#317,-DX,-DY,-DZ
@100,N3,:5,2,:9,'Name'#101,!N1,!N2

Where

The rectangular parallelepiped is first defined with the given parameters. Then the translation of coordinates is defined. The translation is necessary since GEANT and SET use origins in different places. Finally, the transformation operation is defined for a constructed solid which in this case is the translation of the coordinates of a primitive solid. The GEANT shapes are converted to SET as follows:

SHAPE DEFINITION IN SET
BOX rectangular parallelepiped
TRD1 ruled solid between 2 faces
TRD2 ruled solid between 2 faces
TRAP ruled solid between 2 faces
TUBE solid of revolution of a face
TUBS solid of revolution of a face
CONE solid of revolution of a face
CONS solid of revolution of a face
SPHE sphere
PARA ruled solid between 2 faces
PGON first segment ruled solid, other segments copied and rotated, finally boolean union for all the segments
PCON solid of revolution of a face
ELTU solid of linear extrusion of a face
HYPE not implemented
GTRA ruled solid between 2 faces
CTUB solid of revolution and boolean subtraction by 2 half-spaces


next up previous index
Next: 3.2 Position Information Up: 3 Implementation Previous: 3 Implementation


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995