Exchange Toolkit
Why is an InstancePath useful?

To understand the usefulness of this ordered collection, let's begin by examining a typical product structure. Figure 2 shows a block diagram of the Exchange objects required to capture assemblies of parts, as well as part instancing via the use of a prototype. This particular example is from the micro engine CATIA assembly in the samples folder.

ExchangeHierarchy.png
Figure 2. Block diagram of a product hierarchy

The A3DAsmModelFile is the top level object. It contains a collection of A3DAsmProductOccurrence objects. The A3DAsmProductOccurrence object can contain children, a reference to a prototype, or an A3DAsmPartDefinition. The part definition has a container of A3DRiRepresentationItem objects.

For visualization workflows, the representation item is the data structure that is the most interesting because it contains the tessellation. In order to get to this data of interest one must traverse (recursively) all of the aforementioned data structures. And, since a part can be shared by multiple instances in the assembly, the specific traversal path is important. The traversal path determines "net properties", such as location, color, visibility, etc. Figure 3 shows a specific path through the hierarchy. A ts3d::InstancePath is the perfect container to represent this ordered collection of objects.

InstancePath.png
Figure 3. Bold lines indicating a specific path to a representation item instance