Tracing SAT Data
List of: Discussion Topic
Subjects: SAT Save and Restore
Contents: Kernel

Using the ACIS online help "index search can speed the interpretation of the information in a SAT file. The index search lists both class names and save identifiers.


1. Locate the index entry for the save identifier of interest, for example, the class BODY. Follow the index entry to the class information, of which the save identifier is a part.


2. The first three lines of the SAT file contain header information. Parse these lines for information of value, such as the modeling units. For more details about the header, refer to the section Save File Header.


3. For an entity record within the SAT file, read the inner-most save identifier.



a. For more details about entity records, refer to the section Entity Records.



b. For more details about the save identifiers, refer to the section Save Identifiers.



c. For more details about finding the inner-most save identifiers, refer to the section Entity Encapsulation in a Record.


4. Locate the index entry for the save identifier.


5. Follow the index entry for the save identifier to its owning class description in the documentation.


6. The restore methods of the class specify the data associated with that save identifier. This data begins just to the right of the inner-most save identifier of the SAT record. For more details about restore methods, refer to the section Class Restore Methods.


7. The data associated with the save identifier is represented by the pseudo code of the restore methods.


8. The restore methods may reference restore methods for other classes. If required, go to those classes and follow their restore methods. Be sure to keep track of the class restore stack so that tracing can pop back to the correct class restore method.


9. When finished with the data for the given save identifier, go to step 4. for the next inner-most save identifier, if applicable.


10. If there are no more save identifiers and the data portion has encountered the entity record terminator ("#"), go to step 3. for the next entity record.

For example, assume the following line was found in a SAT file.

cone-surface $-1 0 0 0 0 0 1 10 0 0 1 I I 0 1 forward I I I I #

The "surface" keyword is the inner-most save identifier which is next to the NULLENTITY. pointer ($-1). The documentation index for the word "surface" leads to the SURFACE class. So, this is the place to start tracing.

SURFACE Class

public: void SURFACE::restore_common ();

No data This class does not save any data

In this case, the restore method of the SURFACE class does not read any data.

CONE Class

The "cone" keyword is the next inner-most save identifier. The documentation index for the word "cone" goes to the CONE class.

public: void CONE::restore_common ();

cone::restore_data Cone data definition.

The restore method of the CONE class references the restore_data method of the cone class.

cone Class

public: void cone::restore_data ();

ellipse::restore_data Restore the information for the base ellipse

read_real Sine of cone angle

read_real Cosine of cone angle

if (restore_version_number < CONE_SCALING_VERSION)


// the u parameter scale is obtained from the ellipse major axis

else


read_real

u parameter scale

if (restore_version_number < SURFACE_VERSION)


// the reverse u flag is set to FALSE

else


read_logical
u parameter reversed, either "forward" or reversed"

surface::restore_data Generic surface data

The restore method of the cone class references the restore_data method of the ellipse class.

ellipse Class

public: void ellipse::restore_data ();

read_position

Position of the center of the ellipse.

read_unit_vector
Unit vector that is normal to plane of the ellipse.

read_vector


Major axis of the ellipse.

read_real


Ratio of the radii.

curve::restore_data
Restore the underlying curve of the ellipse.

The restore method of the ellipse class finally calls some input functions to retrieve information from the SAT file. Specifically, it reads the position of the base ellipse, which is the first "0 0 0" after the "$-1". It reads a unit vector for the base normal, which is the next "0 0 1". It reads a vector for the major axis of the ellipse, which is "10 0 0". It reads a real, "1", for the ratio of the ellipse major to minor axis. Then it accesses the restore method of the curve class.

curve Class

public: void curve::restore_data ();

if (restore_version_number >= BNDCUR_VERSION)


read_interval
Interval for the subset range.

The restore method of the curve class reads in an interval. The interval itself is made up of two logicals, which happen to be the next "I I", for two infinite values.

The curve::restore_data method returns to ellipse::restore_data, which then returns to cone::restore_data so that processing can resume. The next two values, "0 1", represent the sine and cosine of the cone angle, respectively. The u parameter scale is obtained from the ellipse's major axis. It reads the logical "forward" before accessing the restore method of the surface class.

surface Class

public: void surface::restore_data ();

if (restore_version_number >= BNDSUR_VERSION)


read_interval
subset u interval


read_interval
subset v interval

The surface::restore_data method reads in two intervals which in this case are infinite, "I I I I".

There are no other save identifiers to parse and the "#" indicates that there is no more data associated with that record.
PDF/KERN/09SAT.PDF
HTM/DATA/KERN/KERN/09SAT/0022.HTM