Displacement Constraints
The functions described in this section provide access to the data and contents of the displacement constraints.
Functions Introduced:
The function
ProMechdisplacementdataAlloc() allocates the memory for the displacement constraint data handle.
The function
ProMechdisplacementdataTypeGet() returns the type of displacement constraint data. The types of displacement constraints are:
• PRO_MECH_DISPLACEMENT_REGULAR—Specifies an external limit on the movement of a portion of the model.
• PRO_MECH_DISPLACEMENT_PLANE—This constraint type allows full planar movement, but constrains any off-plane displacement.
• PRO_MECH_DISPLACEMENT_PIN— Creates a constraint along a cylindrical surface for 3D models.
• PRO_MECH_DISPLACEMENT_BALL— Creates a constraint along a spherical surface for 3D models.
Use the function
ProMechdisplacementdataTypeSet() to set the displacement constraint data.
The function
ProMechdisplacementdataCsysGet() returns the reference coordinate system for the displacement constraint. Use the function
ProMechdisplacementdataCsysSet() to set the reference coordinate system for the displacement constraint.
The function
ProMechdisplacementdataRotationconstrsGet() returns the rotational component of the displacement about the X, Y, and Z axis. Use the function
ProMechdisplacementdataRotationconstrsSet() to set the rotational component of displacement.
The function
ProMechdisplacementdataTranslationconstrsGet() returns the translational component of the displacement about the X, Y, and Z directions. Use the function
ProMechdisplacementdataTranslationconstrsSet() to set the translational component of displacement.
The function
ProMechdisplacementregularconstrAlloc() allocates memory for the regular displacement constraint data structure.
The method
ProMechdisplacementregularconstrTypeGet() returns the type of setting for the displacement constraint. Valid values are:
• PRO_MECH_DISPLACEMENT_FREE—Allows freedom of movement in the specified direction.
• PRO_MECH_DISPLACEMENT_FIXED—Constrains the entity, preventing movement in the specified direction.
• PRO_MECH_DISPLACEMENT_ENFORCED—Specifies an enforced displacement or rotation in the specified direction.
The function
ProMechdisplacementregularconstrTypeSet() sets the type of the displacement constraint.
The function
ProMechdisplacementregularconstrValueGet() returns the variation settings of the displacement if the type of displacement constraint is
PRO_MECH_DISPLACEMENT_ENFORCED. The variation settings are as follows:
• An enforced displacement value in length units for the translational component
• An enforced rotation in radians for the rotational component
Use the function
ProMechdisplacementregularconstrValueSet() to set the variation settings of the displacement.
The function
ProMechdisplacementdataTranslationinterpretinradiansflagGet() returns the value
true if the angular translations are interpreted in radians. This is applicable only if the displacement is of type
PRO_MECH_DISPLACEMENT_REGULAR and if cylindrical or spherical coordinate system is selected for the translations. Use the function
ProMechdisplacementdataTranslationinterpretinradiansflagSet() to set the value of the flag interpret angular translations in radians.
The function
ProMechdisplacementregularconstrFree() releases the memory assigned to the regular displacement constraint data handle.
The function
ProMechdisplacementregularconstrProarrayFree() releases the memory assigned to an array of regular displacement contraints.
The function
ProMechdisplacementpinconstrAlloc() allocates memory for the pin constraint data structure.
The function
ProMechdisplacementdataPinconstrGet() returns the pin constraint data structure. The pin constraint can have the following properties:
• Angular—Allows you to control the rotation about the axis of the selected cylindrical surface.
• Axial—Allows you to control translation along the axis of the selected cylindrical surface.
The function
ProMechdisplacementdataPinconstrSet() sets the value for the pin constraint data structure.
The function
ProMechdisplacementdataPinangularconstrTypeGet() returns the angular constraint type for the pin constraint. Use the function
ProMechdisplacementdataPinangularconstrTypeSet() to set the angular constraint type. Valid values are:
• PRO_MECH_DISPLACEMENT_FREE—Allows freedom of movement in the specified direction.
• PRO_MECH_DISPLACEMENT_FIXED—Constrains the entity, preventing movement in the specified direction.
|
Note:
|
The angular constraint cannot be of type PRO_MECH_DISPLACEMENT_ENFORCED.
|
The function
ProMechdisplacementdataPinaxialconstrTypeGet() returns the axial constraint type for the pin constraint.
Use the method
ProMechdisplacementdataPinaxialconstrTypeSet() to set the axial constraint for the pin constraint. Valid values are:
• PRO_MECH_DISPLACEMENT_FREE—Allows freedom of movement in the specified direction.
• PRO_MECH_DISPLACEMENT_FIXED—Constrains the entity, preventing movement in the specified direction.
|
Note:
|
The axial constraint cannot be of type PRO_MECH_DISPLACEMENT_ENFORCED.
|
Use the function
ProMechdisplacementpinconstrFree() to free the memory containing the pin constraint data structure.