Documentation Center

  • Trial Software
  • Product Updates

pmit_create_cadmodelref

Create object of PmitCadModelRefH class

Syntax

PmitError = pmit_create_cadmodelref(PmitCadModelRefH* const pmitCadModelRefHOut, const char* name, const char* nodeID, PmitCadModelH pmitCadModelH, double rotation[9], double trans[3], double scale, int isFlexible, int isFixed, const PmitVisMatProp* matprops)

Description

PmitError = pmit_create_cadmodelref(PmitCadModelRefH* const pmitCadModelRefHOut, const char* name, const char* nodeID, PmitCadModelH pmitCadModelH, double rotation[9], double trans[3], double scale, int isFlexible, int isFixed, const PmitVisMatProp* matprops) returns an error status PmitError.

With pmit_create_cadmodelref, you can create an object of PmitCadModelRefH class to reference a CAD model in an API CAD model hierarchy.

Input Arguments

name

String specifying name of component instance

nodeID

String specifying unique identity of model component within parent hierarchy. This identity must be unique within the full model.

pmitCadModelH

Handle object of PmitCadModelH class representing an API CAD model. This is the same model referenced by the output object pmitCadModelRefHOut, an object of PmitCadModelRefH class.

rotation

Double-type real rotation 9-vector specifying rotational transformation of the origin of this CAD model with respect to its parent CAD model. See Definitions following.

trans

Double-type real 3-vector specifying translation of the origin of this CAD model with respect to its parent CAD model.

scale

Double-type real number specifying overall length scaling of this instance of the model. A value of 1 means no overall scaling.

isFlexible

Integer-type flag specifying whether component is rigid or nonrigid. A value of 0 means the component is rigid; a value of 1 means the component is nonrigid.

isFixed

Integer-type flag specifying whether component is welded or not to its attachment point in the assembly. A value of 0 means the component is not welded; a value of 1 means the component is welded. See Definitions following.

matprops

Structure of type PmitVisMatProp for defining visualized material properties of the machine

Output Arguments

pmitCadModelRefHOut

Handle object of PmitCadModelRefH class referencing a CAD model in an API CAD model hierarchy

More About

expand all

Orthogonal Matrix

A matrix R is orthogonal if it satisfies the matrix multiplication rule RT*R = R*R T = 1, where 1 is the identity matrix.

Rotational Transformation: Rotation Matrix and Rotation Vector

The rotation vector input is a 9-vector, defined from the 3-by-3 orthogonal rotation matrix R, that represents the rotational orientation of a CAD model component with respect to its parent CAD model.

You define the rotation 9-vector column-wise:

rotation = [R(1,1) R(2,1) R(3,1) R(1,2) R(2,2) R(3,2) ...
           ... R(1,3) R(2,3) R(3,3)]

Flexible Model

A flexible or nonrigid model is made of components that can move with respect to one another.

An inflexible or rigid model is made of components that cannot move with respect to one another.

Fixed Model

A fixed model cannot move relative to the ground of the assembly model.

A nonfixed model can move relative to the ground of the assembly hierarchy.

See Also

| | |

Was this topic helpful?