Working With Parts and Assemblies

Volumes can be organized into a hierarchical tree of parts, assemblies, and sub-assemblies. Assemblies may contain parts and other assemblies. Parts, on the other hand, may not contain sub-entities.

Each part and assembly has a name and an optional description. Other attributes may also be assigned, such as a material specification or a link to an entry in a PDM system. See Metadata Attributes.

The relationship between the geometric model and the assembly is determined by associating parts with volumes. A single part can be associated with any number of volumes, including zero volumes. A volume, however, can be associated with only one part.

As volumes are modified, CUBIT automatically maintains the appropriate relationships with parts. If a volume is associated with a part, and that one volume is split into multiple volumes through a webcut or some other operation, each of the resulting volumes is automatically associated with the original volume’s part. Copying a volume will also result in the new volume being associated with the same part as the original volume.

Identifying Parts and Assemblies

A part or assembly is identified by its assembly path. An assembly path is much like a directory path in a file system. It consists of the name of each ancestor in the assembly tree, separated by a forward slash. For example, a part named “p1” contained within the top-level assembly “a1” would be identified by the path “/a1/p1”. If the part “p2” is part of the assembly “a2”, and “a2” is a sub-assembly of “a1”, then “p2” has the path “/a1/a2/p2”.

More than one part or assembly may have the same name. To differentiate between parts or assemblies with the same name and path, each part also has an instance number. If two entities have the same name, they will not have the same instance number. For example, two parts named “p1” may be “p1 instance 1” and “p1 instance 2”.

Instance numbers may be incorporated into assembly paths by placing the instance number in angled braces after a part or assembly name. For example, “p1 instance 3” is identified in a path as “p1<3>”. Other examples of instance numbers in assembly paths include “/a1<1>/a2<1>/p1<3>” and “/a1/a2<1>/p1”. Assembly paths are always allowed to incorporate instance numbers, but are only required to include as many instance numbers as it takes to avoid ambiguity. Note that some commands do accept ambiguous paths, selecting a random entity which matches the path.

Most commands which accept assembly paths also allow the path to be followed by an “instance” command option (for example, metadata list part “/a1/p1” instance 3). The instance option always refers to the instance number of the last item in the path (p1 in the example).

Creating Parts and Assemblies

Parts and assemblies can be created using the following commands:

Metadata Create {Assembly|Part} “<absolute_path>” [Instance <instance>]

If the instance option is not included, CUBIT will assign an appropriate instance number to the new entity. If the instance option IS included, an entity with the specified name and instance number must not already exist or the command will fail.

Note that the path must be absolute, identifying each ancestor of the new entity. Any ancestors of the new entity which do not already exist are automatically created.

Deleting Parts and Assemblies

To delete a part or an assembly, use the Metadata Remove command:

Metadata Remove {Part|Assembly} “<path>”

This will remove the specified part or assembly. Assemblies can only be removed if they have no contents. All contained parts and subassemblies must be removed before removing the parent assembly.

It is also possible to remove all parts and assemblies that have no association with geometric volumes in the model:

Metadata Clean

This can be extremely useful when importing geometry which has been simplified with metadata which has not been simplified. For example, eMatrix currently writes out the full assembly hierarchy even when exporting a simplified representation of the geometry.

Associating Parts with Volumes

The relationship between the geometric model and the assembly is determined by associations between parts and volumes. As stated previously, a part may be associated with any number of volumes, while a volume may be associated with only one part. The easiest way to associate a volume with a part is to use the entity tree in the user interface. Drag a volume in the tree onto a part in the tree, and the volume and part are now associated. Since a volume can only be associated with one part at a time, any previous association between that volume and a part is removed.

Part-to-volume associations can be created on the command line using the Metadata Modify Path command:

Metadata Modify Path “<part_path>” Volume <ids>

The specified volume or volumes will be associated with the part specified by part_path. Any volumes already associated with the specified part will retain their association with the part.

Associations can be removed using the Metadata Remove command:

Metadata Remove Volume <ids>

After the Metadata Remove command has been issued, the specified volumes are no longer associated with any part.

The set of volumes associated with a given part can be modified using the Metadata Replace command:

Metadata Replace Part “<part_path>” Volume <ids>

When the Metadata Replace command is issued, all associations the part may have had with any volumes are removed. New associations are then created with the specified volume or volumes.

Once an assembly tree is created, all assemblies, parts, and part-to-volume associations can be viewed using the command:

Metadata List Tree