Documentation

pmit_create_constrain

Create object of PmitConstrainH class

Syntax

Description

PmitError = pmit_create_constrain(PmitConstrainH* const pmitConstrainhOut, const char* name, PmitConstrainType type, PmitAssemCompH body1Comp, PmitAssemCompH body2Comp, PmitGeomType body1Type, PmitGeomType body2Type, const double body1Loc, const double body1Axis, const double body2Loc, const double body2Axis) returns an error status PmitError.

With pmit_create_constrain, you can create an object of PmitConstrainH class to represent a constraint in an API CAD model.

Input Arguments

For a complete specification of these inputs, see Definitions.

name

String naming the constraint

type

Handle object of PmitConstrainType class to represent constraint type in an API CAD model

body1Comp

Handle object of PmitAssemCompH class to represent first constrained body in an API CAD model

body2Comp

Handle object of PmitAssemCompH class to represent second constrained body in an API CAD model

body1Type

Handle object of PmitGeomType class to represent the geometry of first constrained body in an API CAD model

body2Type

Handle object of PmitGeomType class to represent the geometry of second constrained body in an API CAD model

body1Loc

Double-type 3-vector specifying the spatial location of body 1

body1Axis

Double-type 3-vector specifying the spatial orientation of the axis of body 1

body2Loc

Double-type 3-vector specifying the spatial location of body 2

body2Axis

Double-type 3-vector specifying the spatial orientation of the axis of body 2

Output Arguments

pmitConstrainhOut

Handle object of PmitConstrainH class to represent a constraint in an API CAD model

More About

collapse all

Constraint

A constraint imposes a restriction on how two component bodies can move relative to one another.

You define a constraint by an axis through a point oriented and located, respectively, with respect to body 1.

Body Specification

To impose a constraint, specify the two bodies by their:

  • Component handles

  • Component body geometry type handles

  • Locations in space. The location of body 2 is a translation with respect to the coordinate origin of the CAD model representing body 1.

  • Axis directions in space . The axis of body 2 is a direction with respect to the coordinate axes of the CAD model representing body 1.

Was this topic helpful?