Using a simplistic example of an automobile, we can view it in two ways: a graph and a tree. The logical graph:
 



 
Figure 1-1 Logical Graph
 
high-lights the "Instances". From it, we get the following occurrence trees:
 



 
Figure 1-2 WHEEL.PRT
 



 
Figure 1-3 AXLE.PRT
 



 
Figure 1-4 AUTO.PRT
 
which emphasizes the "Part Occurrences".
 
Explanation:
 
The part WHEEL is loaded and given the Part tag Part-tag-1. It consists of a single object Object-tag-1.
 
The part AXLE is loaded and given the Part tag Part-tag-2. It consists of an object Object-tag-2 for the axle and two instances of the WHEEL piece part. Instance-tag-1 represents the Left wheel and Instance-tag-2 represents the Right wheel. Two Part occurrences are created for these and given the tags Part_Occur-tag-1 and Part_Occur-tag-2. Similarly, two Object Occurrences are created for the wheel object, one for each Part Occurrence, and given the tags Object_occur-tag-1 and Object_occur-tag-2.
 
The part AUTO is loaded as the Displayed Part and given the Part tag Part-tag-3. It consists of an object Object-tag-3 and two instances of the AXLE assembly part. Instance-tag-3 represents the Front axle, and Instance-tag-4 represents the Rear axle.
 
Since there are two instances of the AXLE part in the AUTO assembly part, two Part Occurrences are created for them and given the tags Part_Occur-tag-3 and Part_Occur-tag-4. Similarly, two Object Occurrences are created for the axle object, 1 for each Part Occurrence, and given the tags Object_occur-tag-3 and Object_occur-tag-4.
 
Since there are two instances of the wheel part in the AXLE assembly part, two Part Occurrences are created for them for every occurrence of AXLE in the session. Thus, 4 more Part Occurrences are created for WHEEL. There is a Part Occurrence for the Left wheel Instance (Instance-tag-1) of the Front axle Instance (Instance-tag-3) called Part_Occur-tag-5 and a Part Occurrence for the Right wheel Instance (Instance-tag-2) of the Front axle Instance (Instance-tag-3) called Part_Occur-tag-6. There is also a Part Occurrence for the Left wheel Instance (Instance-tag-1) of the Rear axle Instance (Instance-tag-4) called Part_Occur-tag-7 and a Part Occurrence for the Right wheel Instance (Instance-tag-2) of the Rear axle Instance (Instance-tag-4) called Part_Occur-tag-8. Similarly, 4 more Object Occurrences are created for the wheel object, one for each Part Occurrence of WHEEL. They are named Object_occur-tag-5, Object_occur-tag-6, Object_occur-tag-7, and Object_occur-tag-8.
 
The following table indicates the routines to access given a particular tag when you want to find a tag of a different type. For example, if you have a "PART tag" and need the "PART name" you would call UF_PART_ask_part_name.
 
TO FIND GIVEN CALL
Part Name Part tag UF_PART_ask_part_name()
Part Tag Part Name UF_PART_ask_part_tag
Part Tag Part Occurrence Tag UF_ASSEM_ask_prototype_of_occ()
Part Tag Instance tag UF_ASSEM_ask_parent_of_instance() or
 
UF_ASSEM_ask_child_of_instance()
Part Tag Entity Occurrence Tag UF_ASSEM_ask_part_occurrence() or
 
UF_ASSEM_ask_prototype_of_occ()
Part Occurrence Tag Part tag UF_ASSEM_ask_occs_of_part()
Part Occurrence Tag Part Occurrence Tag UF_ASSEM_ask_part_occ_children() or
 
UF_ASSEM_where_is_part_used()
Part Occurrence Tag Instance tag UF_ASSEM_ask_part_occs_of_inst() or
 
UF_ASSEM_ask_part_occ_of_inst()
Part Occurrence Tag Entity Occurrence Tag UF_ASSEM_ask_part_occurrence()
Instance Tag Part tag UF_ASSEM_cycle_inst_of_part()
Instance Tag Part occurrence tag UF_ASSEM_ask_inst_of_part_occ()
Instance Tag Instance name UF_ASSEM_ask_instance_of_name()
Instance tag Entity Occurrence tag UF_ASSEM_ask_part_occurrence() or
 
UF_ASSEM_ask_inst_of_part_occ()
Entity Tag Entity occurrence tag UF_ASSEM_ask_prototype_of_occ()
Entity Tag Entity handle UF_TAG_ask_tag_of_handle()
Entity occurrence tag Part occurrence tag UF_ASSEM_cycle_ents_in_part_occ()
Entity Occurrence tag Entity tag UF_ASSEM_find_occurrence() or
 
UF_ASSEM_ask_occs_of_entity()
Entity Occurrence tag Entity handle UF_TAG_ask_tag_of_handle()
Entity Handle Entity tag UF_TAG_ask_handle_of_tag()


 

Coordinate Systems


 
All coordinate system references consist of an array of 6 floating point numbers which correspond to two unit vectors. The first vector gives the direction of the X axis, while the second gives the approximate direction of the Y axis. The routine, UF_MTX3_initialize, is always called to make sure the vectors are orthonormal.
 
When an instance is added to an assembly or moved in an assembly, an Origin and Matrix are specified. The Origin is the position in the work part where the absolute origin of the component part or the origin of the component reference set is placed. The instance is transformed so that its absolute CSYS or the CSYS of its reference set (if specified) is matched to this Matrix at the Origin point.

 

CSYS Matrix and Transform Matrix


 
Several of the assembly routines use a CSYS matrix or a 4 x 4 transform matrix either as input or output to the routines. These routines are identified and the matrices are described.
 
In the descriptions the terms space and assembly space should be considered as terms with the following meanings:
 
space
 
assembly space
 
Component CSYS Matrix and Origin
 
Input to: UF_ASSEM_add_part_to_assembly, UF_ASSEM_reposition_instance
 
Output from: UF_ASSEM_ask_component_data
 
The CSYS matrix consists of 6 reals, and the origin consists of 3 reals. The CSYS matrix specifies the x and y orientation of the component in assembly space when adding a component (UF_ASSEM_add_part_to_assembly) or repositioning a component (UF_ASSEM_reposition_instance).
 
The z orientation is generated from the cross-product of the x and y vectors to give a full orientation matrix. This matrix is the one returned from UF_ASSEM_ask_component_data.
 
When adding a component with a reference set, the reference set itself may have a coordinate system attached to it. This is subtracted from the matrix and origin passed in with the effect that the component is positioned by its reference set origin and orientation, instead of its absolute origin and orientation.
 
When asking component data (UF_ASSEM_ask_component_data), if the component is represented by a reference set that is loaded and has a coordinate system, this coordinate system is added to the component in an attempt to return the same CSYS matrix and origin as specified when adding the component.
 
V10 Component Transform
 
Input to: <none>
 
Output from: UF_ASSEM_ask_component_data, UF_ASSEM_ask_transform_of_occ
 
A component transform is a 4x4 array of reals. The transform is returned from UF_ASSEM_ask_component_data and UF_ASSEM_ask_transform_of_occ. The top-left 3x3 element of the transform (i.e transform[0][0] to transform[2][2] inclusive) is the matrix that maps the component orientation from its space into assembly space, so it has equivalent sense to the v9 rigid motion matrix. As such it is the transpose of the CSYS matrix specified to position the component (and the matrix returned from UF_ASSEM_ask_component_data).
 
In the following description we use "tr" as an abbreviation for transform.
 
In summary, the component CSYS matrix and origin map to the transform in the following ways:
 
tr[0][0]=csys[0], tr[0][1]=csys[3], tr[0][2]=csys[6], tr[0][3]=orig[0]
tr[1][0]=csys[1], tr[1][1]=csys[4], tr[1][2]=csys[7], tr[1][3]=orig[1]
tr[2][0]=csys[2], tr[2][1]=csys[5], tr[2][2]=csys[8], tr[2][3]=orig[2]
tr[3][0]=unused, tr[3][1]=unused,tr[3][2]=unused,tr[3][3]=scale=1
 
The origin of the component is contained in the tr[0][3] to tr[2][3] column range. That is:
 
tr[0][3]=orig[0] = x-coordinate of the origin
tr[1][3]=orig[1] = y-coordinate of the origin
tr[2][3]=orig[2] = z-coordinate of the origin
 
The CSYS matrix (orthonormal rotation matrix), tr[0][0] to tr[2][2], are column vectors.
 
where:
 
csys[0], csys[1], csys[2] are the i, j, k components of the X-vector.
csys[3], cys[4], csys[5] are the i, j, k components of the Y-vector.
csys[6], csys[7], cys[8] are the i, j, k components of the Z-vector.
 
The tr[3][0] to tr[3][3] row range is unused and tr[3][3] represents the scale which is always 1.