uf5940 (view source)
Defined in: uf_trns.h
Overview
Returns a matrix to map coordinates from one coordinate system to another.
Note: rp1 and rp2 are invalid when they contain a zero direction vector, or
the X and Y vectors are parallel.
Return
void.
Environment
Internal & External
Required License(s)
gateway
void uf5940
(
double ref_csys [ 9 ] ,
double dest_csys [ 9 ] ,
double matrix [ 12 ] ,
int * status
)
double | ref_csys [ 9 ] | Input | Real Data For Reference Coordinate System rp1[0-2] is the origin in absolute coordinates. rp1[3-8] are the X and Y vectors in absolute coordinates. |
double | dest_csys [ 9 ] | Input | Real Data For Destination Coordinate System rp2[0-2] is the origin in absolute coordinates. rp2[3-8] are the X and Y vectors in absolute coordinates. |
double | matrix [ 12 ] | Output | Resulting Matrix. This must be declared to hold 12 doubles. |
int * | status | Output | Status Code 0 = Success 1 = rp1 Is Invalid 2 = rp2 Is Invalid |
uf5941 (view source)
Defined in: uf_trns.h
Overview
Returns the transformation of a position. No new objects are created here.
When rp2 is the "Change Coordinate" matrix (from UF5940), ra1 should be a
position with respect to the reference coordinate system in the input in order
to get back ra1 as a position with respect to the destination coordinate system
in the output. When rp2 is any other type of transformation matrix, ra1 should
be a position in the absolute coordinates. The output in ra1 is then a
transformed position in absolute coordinates as well.
Note: The array for the transformation matrix was changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void.
Environment
Internal & External
Required License(s)
gateway
void uf5941
(
double ra1 [ 3 ] ,
double rp2 [ 12 ]
)
double | ra1 [ 3 ] | Input / Output | Position/ Transformed Position |
double | rp2 [ 12 ] | Input | Defined Transformation Matrix. This must be declared to hold 12 doubles. |
uf5942 (view source)
Defined in: uf_trns.h
Overview
Returns a product of two previously defined transformation matrices.
This is not a math routine to multiply any 2 matrices. The input matrices are
transformation matrices only, and the product is the compound transformation
matrix.
Note: The array for matrix1, matrix2 and product were changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void.
Environment
Internal & External
Required License(s)
gateway
void uf5942
(
double matrix1 [ 12 ] ,
double matrix2 [ 12 ] ,
double product [ 12 ]
)
double | matrix1 [ 12 ] | Input | Matrix Number 1. This must be a 12 element array. |
double | matrix2 [ 12 ] | Input | Matrix Number 2. This must be a 12 element array. |
double | product [ 12 ] | Output | Product Matrix. This must be a 12 element array. |
uf5943 (view source)
Defined in: uf_trns.h
Overview
Returns a matrix to perform a linear transformation a delta distance along the
X-, Y-, and Z- axes of the absolute coordinate system.
Note: The array for the translation matrix was changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void.
Environment
Internal & External
Required License(s)
gateway
void uf5943
(
double translation [ 3 ] ,
double matrix [ 12 ]
)
double | translation [ 3 ] | Input | Distance To Translate rp1[0-2] contains Dx, Dy and Dz respectively. |
double | matrix [ 12 ] | Output | Translation Matrix. This must be a 12 element array. |
uf5944 (view source)
Defined in: uf_trns.h
Overview
Returns a matrix to perform a scaling, uniform or non-uniform, about an
arbitrary origin.
Note: The array for the scaling matrix was changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void.
Environment
Internal & External
Required License(s)
gateway
void uf5944
(
int * type,
double scales [ 3 ] ,
double origin [ 3 ] ,
double matrix [ 12 ] ,
int * status
)
int * | type | Input | Type 1 - Uniform 2 - Non-Uniform |
double | scales [ 3 ] | Input | Scaling Factors. rp2[0] is Sx (or factors when type=1) rp2[1] is Sy (not used when type=1) rp2[2] is Sz (not used when type=1). |
double | origin [ 3 ] | Input | Scaling Origin (Absolute Coordinates) |
double | matrix [ 12 ] | Output | Scaling Matrix. This must be declared to hold 12 doubles. |
int * | status | Output | Status Code 0 - Success 1 - Scaling Factor Is Not Greater Than Zero 2 - Invalid Option |
uf5945 (view source)
Defined in: uf_trns.h
Overview
Returns a matrix to perform a rotation around an arbitrary axis.
Note: The array for the rotation matrix was changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void
Environment
Internal & External
Required License(s)
gateway
void uf5945
(
double origin [ 3 ] ,
double direction [ 3 ] ,
double * degrees_rotation,
double matrix [ 12 ] ,
int * status
)
double | origin [ 3 ] | Input | Origin Of The Axis - Absolute Coordinates |
double | direction [ 3 ] | Input | Direction Vector - Absolute Coordinates |
double * | degrees_rotation | Input | Rotation Angle In Degrees |
double | matrix [ 12 ] | Output | Rotation Matrix. This must be declared to hold 12 doubles. |
int * | status | Output | Status Code 0 - Success 1 - Direction Vector Is A Zero Vector |
uf5946 (view source)
Defined in: uf_trns.h
Overview
Returns a matrix to perform a reflection through a line or a plane.
This function will not work with a datum plane. If a datum plane is passed in as
input, an error will be returned.
When the line is perpendicular to the XY plane there is an infinite number of
planes that pass through the line and are perpendicular to the XY plane;
therefore, error code = 2.
Note: The array for the mirror matrix was changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void
Environment
Internal & External
Required License(s)
gateway
void uf5946
(
tag_t * object,
double matrix [ 12 ] ,
int * status
)
tag_t * | object | Input | Line Or Plane Object Identifier |
double | matrix [ 12 ] | Output | Mirror matrix. This must be declared to hold 12 doubles. |
int * | status | Output | Status Code 0 - Success 1 - Invalid Line Or Plane Object Identifier 2 - Unique Plane Through Line Cannot Be Defined |
uf5947 (view source)
Defined in: uf_trns.h
Overview
Transform objects according to a previously defined matrix. The matrix should
be defined by calls to uf5942-uf5946.
The upper limit on the number of objects to transform is 32767. The object
types supported for non-uniform scaling are the same as those supported by
non-uniform scaling in interactive NX.
This function will not move objects when their parents need to be transformed.
Use UF_MODL_transform_entities to transform objects and their parents.
Note: The array for the transformation matrix was changed to be 12 instead of
16. The code only uses the first 12 elements of the array to do the transformation
so the last 4 elements were not necessary.
Return
void
Environment
Internal & External
Required License(s)
gateway
void uf5947
(
const double rp1 [ 12 ] ,
const tag_t objects [ ] ,
const int * n_objects,
const int * move_or_copy,
const int * dest_layer,
const int * trace_curves,
tag_t * copies,
tag_t * trace_curve_group,
int * status
)
const double | rp1 [ 12 ] | Input | Defined Transformation Matrix. This must be a 12 element array. This array should be initialized using the functions uf5942-uf5946 to produce the required transformation. |
const tag_t | objects [ ] | Input | Array of object identifiers. |
const int * | n_objects | Input | Number of objects in objects array. |
const int * | move_or_copy | Input | Move/Copy Status 1 - Move 2 - copy. |
const int * | dest_layer | Input | Destination Layer, 0 - the original layer, -1 - the work layer 1 - 256 - the specified layer |
const int * | trace_curves | Input | Trace Curve Status, 1 means on, 2 means off. |
tag_t * | copies | Output | List of copied object identifiers. This is not used when move_or_copy is equal to 1 (move). When move_or_copy is 2 (copy), this must be dimensioned by the caller as large enough to contain the same number of objects that are in the objects array. |
tag_t * | trace_curve_group | Output | Group of trace curves. This is not used when the trace_curves input is set to 2 (off). |
int * | status | Output | Status Code 0 - Success 1 - Too Many Or Too Few Entities To Transform 2 - Invalid Parameter 3 - Invalid Object (Not Alive Or Not Transformable) 4 - Shear Matrix With Non-shearable Objects In The List 5 - Modeling update error 6 - Error adding modeling data to copied solid 7 - Cannot scale parametric solid 8 - Transformation is unsuitable for the object 9 - Cannot scale developed curve 10 - Cannot mirror solid 11 - Cannot transform occurrence 12 - Cannot transform sketches or sketch curves |
UF_MODL_ask_entity_parents (view source)
Defined in: uf_trns.h
Overview
The following function will check if there are any parents with input entities.
If input entities have parents, the parent entities will be collected
Return
Error code
Environment
Internal & External
History
Originally released in NX502
Required License(s)
solid_modeling
int UF_MODL_ask_entity_parents
(
int num_entities,
tag_t * entities,
logical * found_parent,
int * num_parent_entities,
tag_t * * parent_entities
)
int | num_entities | Input | - number of entries in following array |
tag_t * | entities | Input | - array of entities to transform |
logical * | found_parent | Output | - if found_parent = false, found no parents if found_parent = true, found parents |
int * | num_parent_entities | Output | - if found_parent = true, the number of parent entities will be output |
tag_t * * | parent_entities | Output to UF_*free* | - if found_parent = true, the parent entities will be output call UF_free to free parent_entities only if found_parent = true |
UF_MODL_transform_entities (view source)
Defined in: uf_trns.h
Overview
The following function will transform the input entities
and all of its parents.
It supports input entities from diffferent components in assembly context.
The component of input entity will be fully loaded after transforming if it's partially loaded.
Return
Error code
Environment
Internal & External
History
Originally released in NX502
Required License(s)
solid_modeling
int UF_MODL_transform_entities
(
int num_entities,
tag_t * entities,
double matrix [ 16 ]
)
int | num_entities | Input | - number of entries in following array |
tag_t * | entities | Input | - array of entities to transform |
double | matrix [ 16 ] | Input | - matrix defining transform |