Optional Sequence Numbers
List of: Discussion Topic
Subjects: SAT Save and Restore
Contents: Kernel

The indexing of the entity records depends on the active ACIS options when the model was saved. If they are indexed, the indexing is sequential starting at 0. All top level entities must appear before any other entities. Thereafter, the record order is not significant.

The optional sequence number represents the index assigned to a record and is intended to improve readability and simplify editing of ACIS save files. The option sequence_save_files controls whether ACIS writes sequence numbers to the part save file.

-0 body $1 $2 $-1 $-1 #

.

.

.
-25 point $-1 10 0 25 #

In the example above from a SAT file, "-0" and "-25" are sequence numbers. In the first line, "$1 $2" happen to be pointers to records (not shown) with sequence numbers "-1" and "-2", respectively.

This sequence number itself can be turned on or off for the entity records in the save file. Even when the sequence number is not written to the file, it is implied by the order of the records in the file. Pointers to other records correspond to these implied sequence numbers. If sequence numbers are turned off, a record cannot be simply moved or removed from the save file, because this will create invalid index referencing when the file is restored.

If sequence numbers are turned on, an entity may be deleted by simply removing its record from the save file. Any references to the removed record's index become NULL pointers when the file is restored by ACIS. With sequence numbers on, records may also be rearranged within the file.

A mixture of records with sequence numbers and records without sequence numbers is permitted within the save file. Any record having a sequence number is given an index one greater than the previous entry in the file. Specified sequence numbers can be in any order. However, care must be taken that no sequence number repeat itself, either through manual specification of sequence numbers or the implied incrementing of other, nonspecified, sequence numbers.

Regardless of what sequence numbers they contain, the entities represented by the first records are assumed to be the top-level entities. Top-level entities are part of the ACIS topology. Also, if the total entity count was written in the header and the last record's sequence number is not one less than that count, a dummy record with a sequence number equal to the count must be added at the end of the file.
PDF/KERN/10SAVE.PDF
HTM/DATA/KERN/KERN/10SAVE/0005.HTM