uf_assem.h (view source)
 
Overview
Open API interface to NX Assemblies. The major areas covered by these
routines are:
. Access to assembly objects
. Component Arrays
. Components and reference sets
. Family of parts
. Exploded views
. Import and export clone logs
. Assembly Sequences
. Deform Component
. Assembly Cut

Terminology and Concepts
Automobile example

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 - The absolute coordinate system of the component.
assembly space - In the case of UF_ASSEM_ask_transform_of_occ and
UF_ASSEM_ask_component_data, when given a part occurrence, the
assembly is the part where the component belongs (not
necessarily the displayed part). In this case assembly space
can be translated to "absolute csys of the owning assembly".
However, if an instance is passed into
UF_ASSEM_ask_component_data the assembly space is "the
absolute csys of the component's immediate parent".

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).

NOTE 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

Component Arrays

These subroutines offer access to the NX database component arrays.
The functions in this section allow you to:

Get a list of the component arrays defined by a given part.
Get a list of the arrays which contain a given instance.
Get information on an ISET Component array in the "array_data" structure.
Get information on a Master Component array in the "array_data" structure.
Get the type of an array.
Check the status of a component array.
Create an ISET array, based on the parameters in the "array_data" structure.
Create a Master Component array in the work part, based on the parameters
in the "array_data" structure.
Delete an array.
Edit an ISET Component array.
Edit a Master Component array.
Suppress a component array so that it no longer updates.
Unsuppress a component array so that it updates.

There are two types of component arrays - ISET arrays, and Master Component
(MC) arrays. ISET arrays are based upon feature ISETs, where each component in
the array is positioned by mating conditions to an element in the feature ISET.

MC arrays are based upon a master component. Each element in the array is mated
to the master component, but is offset in a direction (or directions) defined
by other geometry in the assembly. See the Assemblies Documentation for a more
detailed description of component arrays.

Components and Reference Sets

Using these subroutines, you can:

Add members to an existing reference set.
Get the parent component of an object.
Count the number of occurrenced members in a source component.
Cycle the occurrenced members in a source component.
Count the number of links from an object to the containing reference sets.
Get the object identifier of the reference set that contains the object.
Create component by retrieval.
Read and edit component data.
Read and count component members.
Update component.
Read members components.
Create reference set.
Read and edit reference set data.
Read and count reference set members.
Add or remove objects from a reference set.
Create component by filing.
Read members reference set.
get a where-used list on a component part

Family of Parts

These subroutines offer support for the Assemblies family of parts. This
support consists of access to instance intent which are the family intent rules
associated with an assembly instance. This allows the system to automatically
select a new part family member based upon the rules which specify the member
selection intent.

Using the subroutines in this section, you can:

Return intent data of an instance.
Evaluate intent data of an instance and optionally applies the result.
Free intent data returned from UF_ASSEM_ask_instance_intent.
Assign intent data to an instance.

Exploded Views

These subroutines offer access to exploded views. Using the subroutines in this
section, you can:

get the explosion transform of a particular part occurrence
get the total absolute transform of a component in the given explosion
get the explosion vector for the component
get the hidden components in a view
get the explosion which is displayed in a view
create an explosion in the specified display part
Delete the specified explosion
explode a component by a transform
hide the given component in a view
explode a component back to its normal assembly position
sets the explosion used in a view
unhide the given component in a view
unexplode a component

CAUTION: The effects of the explosion vector on coordinates are not accounted
for when working in context in an exploded view. Therefore, we recommend that
you use the Hide Explosion from View Option (see the "Exploded Views" chapter
of the Assemblies User Manual).

Assembly Sequences

These subroutines offer access to the Assembly Sequences functionality. An
assembly sequence imposes an order upon the part occurrences that it references.
A sequence is defined as a collection of assemble or disassemble steps. Each
assemble or disassemble step can reference a particular part occurrence in the
assembly in which the sequence is defined. The user can also choose to
assign a time, cost, or description to each step in the assembly sequence.
Step numbers are automatically assigned, based on the step increment set by the
user (by default the step increment is 10). Using these subroutines, you can:

create an assembly sequence
assign or query the name, description, or step increment associated with a sequence
ask the existing sequences in the part
ask part occurrences that have not been considered in the sequence
mark part occurrences as preassembled into the assembly sequence
mark part occurrences as needing to be ignored for an assembly sequence
delete part occurrences from the preassembled or the ignored set
query if a part occurrence is in the preassembled or the ignored set
create a step in the sequence for a part occurrence
query the steps that exist in a sequence for a given part occurrence
ask the part occurrence for a specified step in the sequence
assign or query the time, cost, or description with any step
query the aggregate time or cost of the sequence
ask steps in the sequence
reorder steps in the sequence
playback a sequence
playback the sequence to a particular step in it
query the duration in playback frames of a sequence, step, or step element
query the current playback frame of a sequence
delete individual steps or the entire assembly sequence

CAUTION: Some functions will require the sequencing environment to be intialized
before they can be called. No changes to the actual design model should be made
while the sequencing environment is active, in particular no modelling changes
or assembly structure changes. When no further sequencing operations are required
UF_ASSEM_terminate_sequencing should be called.

Deform Components.

These subroutines offer access to Deform Component functionality. The
ability to identify a part as deformable and then deform it into an assembly
without changing the original part.

Some Terms for deform part functionality.

deformable part: is a part that has a definition that allows its deformation.
deformed part: is a part occurrence that has been changes according to its parts definition in the assembly part.

With subroutines made available in this section, you can:

Create a part as deformable
Deform a part into a assembly context.
Ask the definition of a deformed part occurrence.
Ask the current deformation of a part occurrence
Ask all deformations of a part occ.
Detect if a part is deformable
Ask the deformable definition of a part.
Ask for the deformed definition of a deformed feature.
Ask for the deformed definition of a deformable feature.

Assembly Cut Features.

These routines allow access to Assembly Cut features.
These are Boolean subtractions in assembly parts, with components as the targets and tools.
Bodies in the assembly part can also be used as the tools of Assembly Cut features

Create an assembly cut with multiple tools and multiple targets.
Edit an assembly cut by adding or removing tools and targets.
Ask the targets and tools of the assembly cut.

 


 
uf_assem_types.h (view source)
 
Overview