Subtypes and References Example
List of: Discussion Topic
Subjects: SAT Save and Restore
Contents: Kernel


As a more graphical illustration of how subtyping and referencing work in a save file, several Scheme commands and a resulting SAT file are presented. The Scheme commands generate a cylinder which has one end bounded by a spline face. Another cylinder intersects the cylinder along the spline face, forming a cylindrical groove in the spline face. The spline surface is used in the definition of several spline curves in this example.




Figure 9-5. Creating a SAT File


The following example is taken from the file exm_ref.sat created in the above Scheme code. It does not list all sequence numbers from 0 to 171, but rather only a portion of them. The highlighted entries for sequence numbers 17, 96, and 118 are explained in more detail following this listing.




The first occurrence of a subtype definition for exactsur is on sequence number 17, and is numbered 0 in the subtype index table. This is explained in the following table.


Table 9-1. Code Output Description

Code Output Class Description
17
Sequence number 17.
spline- SPLINE save identifier for the spline class
surface SURFACE save identifier for the SURFACE class
$-1 ENTITY Pointer to the attribute record
forward spline Parameter defining the sense direction for the spline curve.
{
Start of the subtype definition. In this particular case, the subtype index number is 0.
exactsur exact_spl_sur Subtype name is exactsur and uses data element spl_sur.

spl_sur Data element, which has a bs3 surface and a real used as the fit tolerance.
nubs bs3_surface Ident: used as part of Bspline curve definition.
3 bs3_surface integer, udegree.
3 bs3_surface integer, vdegree.
open bs3_surface ident: uclosure identifier.
open bs3_surface ident: vclosure identifier.
none bs3_surface ident: usingularity.
none bs3_surface ident: vsingularity.
3 bs3_surface ident: number of uknots.
2 bs3_surface ident: number of vknots.
[Data not shown]
Data that was left out related to the uknot values, their paired multiplicity, the vknot values, their paired multiplicity, associated x, y, z coordinates, and a fit tolerance.
}
End of the subtype definition. In this particular case, the subtype index number is 0.
I I surface interval - uparameter range.
I I surface interval - vparameter range.
#
Terminator for sequence number -17.



The listing before the above table also has an example of a reference. Sequence number -118 has the text "{ ref 8 }" embedded within its information. This is a direct reference to subtype object 8. (This references the ninth subtype definition within the file, because the subtype index numbering begins with 0.)


The subtype object with the index number 8 is defined on sequence number 96. Thus, that definition of a surfintcur is used as part of sequence number 118. Note that the reference to subtype 8 in sequence number 118 actually occurs during the definition of another subtype. Moreover, nested subtype definitions are also supported, as is seen within the subtype definition on sequence number 96.
PDF/KERN/09SAT.PDF
HTM/DATA/KERN/KERN/09SAT/0024.HTM