Synopsis

PDX_MSGT iges_Create124(long option, T_IGES_124_BASE1 *entity, MDA_PTR *db_ptr, double *rotation, MTH_3DPNT translation)

Purpose

Create an IGES 124 entity.

Description

This function will create an IGES 124 transformation matrix entity. An option to check for duplicate matrices may be specified. If a duplicate matrix is found, the database pointer of that matrix will be returned. If the option to check for an identity matrix is specified and the matrix is the identity, the database pointer will be set to MDA_NULL_PTR. If the option to check the Z rotation is specified and the X, Y rotation, and X, Y, Z translation is 0, the rotation will be calculated. If the option to check the X, Y, Z translation is specified and the X, Y, Z rotation is 0, the translation will be calculated. The tolerances ANGLE_TOL and MODEL_SPACE_PNT_TOL defined in the current model are used for comparison of rotation and translation respectively. Please note: Except for the IGES_IDENTCHECK, the options passed in will only work on IGES 124 entities that were created by calling this function.

Input

option

IGES_DUPECHECK

Check for duplicate matrices.

IGES_IDENTCHECK

|IGES_DUPECHECK Check for identity matrices.

IGES_ROTCHECK

|IGES_DUPECHECK Consider matrices with the same Z normal as the given matrix to be duplicates and return the Z rotation difference in rotation.

IGES_TRNCHECK

|IGES_DUPECHECK Consider matrices with the same plane but different translation to be duplicates and return the translation difference in translation.

entity

IGES 124 entity structure pointer which was allocated with mda_MallocEntity. The entity will either be freed (duplicate entity) or created, so the application must not free it or create it.

Output

db_ptr

Matrix database pointer

rotation

Z rotation angle

translation

X, Y, Z translation vector

Return

IGES_NOERR or error