Quantcast

Documentation Center

  • Trial Software
  • Product Updates

pmit_create_cadmodel

Create object of PmitCadModelH class

Syntax

PmitError = pmit_create_cadmodel(PmitCadModelH* const pmitCadModelHOut, const char* name, double mass, const double inertia[6], const double cg[3], double volume, double sarea, const char* fileName, const PmitVisMatProp* matprops)

Description

PmitError = pmit_create_cadmodel(PmitCadModelH* const pmitCadModelHOut, const char* name, double mass, const double inertia[6], const double cg[3], double volume, double sarea, const char* fileName, const PmitVisMatProp* matprops) returns an error status PmitError.

With pmit_create_cadmodel, you can create an object of PmitCadModelH class to represent an API CAD model.

The body geometry file specified by fileName carries no units. This body geometry is interpreted with the units defined for the API session.

Input Arguments

name

String naming the CAD assembly or part model

mass

Double-type real number specifying the mass of the assembly or part

inertia

Double-type real 6-vector specifying the rotational inertia of the assembly or part. See Definitions following.

cg

Double-type real 3-vector specifying the position of the center of gravity of the assembly or part

volume

Double-type real number specifying the volume of the assembly or part

sarea

Double-type real number specifying the surface area of the assembly or part

fileName

String specifying STL body geometry file name

matprops

Structure of PmitVisMatProp class specifying the visualizable properties of the assembly or part

Output Arguments

pmitCadModelHOut

Handle object of PmitCadModelH class representing an API CAD model

More About

expand all

Inertia Tensor and Inertia Vector

The inertia vector input is a 6-vector defined from the 3-by-3 symmetric inertia tensor I that depends on the part's mass distribution:

where I21 = I12, I31 = I13, etc.

You define the inertia 6-vector as:

inertia = [I(1,1) I(2,2) I(3,3) I(1,2) I(3,1) I(2,3)]

See Also

| | |

Was this topic helpful?