Scheme Data Types and Methods
List of: Discussion Topic
Subjects: Scheme Interface
Contents: Scheme Support

ACIS defines a set of data types and methods for the native Scheme language. Data types and methods do the following:

Determine if a Scheme object (ScmObject) is an object of a particular type.
Convert a Scheme object into the corresponding C++ object.
Convert a C++ object into the corresponding Scheme object.
Evaluate Scheme expressions from C++.
Enable application developers to define their own new data types and Scheme procedures.

For descriptions of the data types that ACIS provides, refer to their reference templates.

Scheme AIDE provides data types specifically for use with ACIS Scheme extensions, in addition to those that are native to Scheme. These data types are described in online help. Some data types are specific to ACIS, such as entity, pick-event, and gvector. Other data types are native to Scheme, such as boolean, integer, and real. Native data types are documented in online help only if they are needed to describe the ACIS data types.

The reference template for Scheme extensions includes an Arg Types field that specifies the data type of each object passed into the extension and a Returns field that specifies the data type of the object returned by the extension. In some cases, the return of an extension is unspecified, and the Returns field contains the word unspecified. This is not an actual data type, only an indicator of the lack of a specified data type returned by the extension.

At their highest level, all Scheme object data types are scheme-objects. When an ACIS Scheme extension is invoked, a C++ handler procedure generally converts the scheme-object arguments to their corresponding C++ types, performs ACIS or other operations, then converts the result back to a scheme-object, which is returned by the extension.

At their next highest level, many types of arguments are entitys. entity objects are saved and restored as part of the model and are referred to as persistent. Non-entity objects are not saved and restored as part of the model (they are lost when Scheme AIDE is terminated) and are referred to as transient.

At more specific levels, many types of arguments are really subtypes of entity. For example, body, lump, shell, face, coedge, edge, vertex, and wire are all topological subtypes of entity.

Figure 3-1 graphically depicts the data type relationships. An item in the tree is read from right to left. For example, a circular-edge is a curve-edge that is an edge that is an entity that is a scheme-object. Individual derivations are shown in each data type's description.


Figure 3-1. Scheme Data Type Relationships

Data types immediately derived from scheme-object that have unique external representations are true data types implemented in Scheme or in extensions. Other data types without distinct external representations are not true data types, but subclassifications used only as a convenience for the purposes of discussion.
PDF/SCM/03EXTSC.PDF
HTM/DATA/SCM/SCM/03EXTSC/0005.HTM