pycatia.dnb_human_modeling_interfaces.swkik_constraint

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.dnb_human_modeling_interfaces.swkik_constraint.SWKIKConstraint(com_object)

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
DNBHumanModelingInterfaces.SWKManikinPart
SWKIKConstraint

This interface manages the constraint of the manikin.
It provides access to the constraints data (ID, EndEffector,
StartSegment,…)
property active: bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Active() As boolean

Returns or sets the constraint activity.
A constraint being active means that the constraint is taken
into account during the resolution.

If the constraint is not active,then it is ignored during the resolution.
Return type:

bool

property angle_criteria: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property AngleCriteria() As double

Returns or sets the angle criteria that will be used to evaluate success or
failure of the constraint resolution. If, after resolution, the agle between
the constraint and the target is lower than the criteria, then the constraint
will be considered resolved. This criteria must be specified in radians.
Return type:

float

property angle_to_target: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property AngleToTarget() As double (Read Only)

Returns the angle (in radians) from the constraint end effector to the
target.
Return type:

float

property distance_criteria: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property DistanceCriteria() As double

Returns or sets the distance criteria that will be used to evaluate success
or failure of the constraint resolution. If, after resolution, the distance
between the constraint and the target is lower than the criteria, then the
constraint will be considered resolved. This criteria must be specified in
millimeters.
Return type:

float

property distance_to_target: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property DistanceToTarget() As double (Read Only)

Returns the distance (in mm) from the constraint end effector to the
target.
Return type:

float

property end_effector: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property EndEffector() As CATBSTR

Returns or sets the end effector of the IK chain of the constraint. The
string in this property is the short name of the last segment (or line of
sight) to be driven by this constraint
Return type:

str

get_constraint_element() AnyObject

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetConstraintElement() As CATBaseDispatch

Returns a reference to the target object of the constraint (if any).
Return type:

AnyObject

get_end_effector() SWKBodyElement

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetEndEffector() As SWKBodyElement

Returns the end effector of the IK chain of the constraint.
Return type:

SWKBodyElement

get_start_segment() SWKSegment

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetStartSegment() As SWKSegment

Returns the start segment of the IK chain of the constraint.
Return type:

SWKSegment

get_target_line(po_target_line_coord: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetTargetLine(CATSafeArrayVariant poTargetLineCoord)

Get the target points coordinates of a line This method
retrieves the origin point coordinates as (x, y, z) data
and the direction value of a line.

Parameters:

poTargetLineCoord
The array of 6 data containing target point coordinates as x, y, z
respectively and the x, y, z direction values for the target line.
Parameters:

po_target_line_coord (tuple) –

Return type:

None

get_target_plane(po_target_plane_coord: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetTargetPlane(CATSafeArrayVariant poTargetPlaneCoord)

Get the target points coordinates of a line This method retrieves the
origin point coordinates as (x, y, z) data and the direction value of a
line.

Parameters:

poTargetLineCoord
The array of 9 data containing origin point coordinates as x, y, z,
the first normalized direction as x, y, z coordinates and the x, y, z
ortho-normalized direction values for the target plane.
Parameters:

po_target_plane_coord (tuple) –

Return type:

None

get_target_point(po_target_pt_coord: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetTargetPoint(CATSafeArrayVariant poTargetPtCoord)

Get the target point coordinates. This method retrieves the target point
coordinates as (x, y, z) data under an array form.

Parameters:

poTargetPtCoord
The array containing target point coordinates as x, y, z
respectively, the x coordinate being the first data in the array.
Parameters:

po_target_pt_coord (tuple) –

Return type:

None

property identifier: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Identifier() As CATBSTR (Read Only)

Returns the identifier(ID) of the constraint.
Return type:

str

property is_success: bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property IsSuccess() As boolean (Read Only)

Returns whether the resolution of this constraint is a success or a
failure, given the current criteria.
Return type:

bool

property manikin: SWKManikin

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Manikin() As SWKManikin (Read Only)

Returns the manikin which owns this IK constraint.
Return type:

SWKManikin

property priority: int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Priority() As long

Returns or sets the priority of the constraint.
When using that property, the number returned or set
is an integer and must be between 1 and 4 inclusive.
The lower the priority, the more prioritary the constraint becomes.
Return type:

int

reset_target() None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub ResetTarget()

Reset the offset of the target object (i.e. set the offset
to the end effector’s current position).
Return type:

None

property rotation_offset_angle: float

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property RotationOffsetAngle() As double

Returns or sets the rotation offset angle for the 3D plane
constraint.
This rotation offset angle(rad) is used to adjust 3D plane
constraint.
When using that property, the number returned or set
must be between -PI and PI inclusive.
Return type:

float

set_constraint_element(pi_constraint_element: AnyObject, pi_constraint_type: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetConstraintElement(CATBaseDispatch
piConstraintElement,
CATBSTR piConstraintType)

Set the target object to follow. This method establishes a part relation
between the end effector and an object to follow.

Parameters:

piConstraintElement
A reference to the target object
This target object can be either a wireframe

GeometricElement object such as a plane or a line, or a boundary
representation object such as a face, a vertex or an edge. In the case of a
‘Fix on’ constraint, the target object must be the product ( CATIAProduct)
associated with the constraint.
piConstraintType
The type of the constraint.
This parameter can take the following values: “Coincidence”, “Contact”,
“Contact2D”, “Contact3D”, “FixPositon”, “FixOrientation”,
“FixPositonAndOrientation”, “FixOnPositon”, “FixOnOrientation” and
“FixOnPositonAndOrientation”.
Parameters:
  • pi_constraint_element (AnyObject) –

  • pi_constraint_type (str) –

Return type:

None

set_target_line(pi_object: Reference, pi_start_point_x: float, pi_start_point_y: float, pi_start_point_z: float, pi_end_point_x: float, pi_end_point_y: float, pi_end_point_z: float, pi_constraint_type: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetTargetLine(Reference piObject,
double piStartPointX,
double piStartPointY,
double piStartPointZ,
double piEndPointX,
double piEndPointY,
double piEndPointZ,
CATBSTR piConstraintType)

Set the target line to follow. This method establishes a contact or
coincidence constraint between the end effector and the
line.

Parameters:

piConstraintElement
A reference to the target object
This target object must be the product (

CATIAProduct) associated with the constraint.
piStartPointX
The x coordinate of the start point of the line, relatively to the
father object.
piStartPointY
The y coordinate of the start point of the line, relatively to the
father object.
piStartPointZ
The z coordinate of the start point of the line, relatively to the
father object.
piEndPointX
The x coordinate of the end point of the line, relatively to the father
object.
piEndPointY
The y coordinate of the end point of the line, relatively to the father
object.
piEndPointZ
The z coordinate of the end point of the line, relatively to the father
object.
piConstraintType
The type of the constraint.
This parameter can take the values “Contact”, “Contact2D”, “Contact3D”
or “Coincidence”.
Parameters:
  • pi_object (Reference) –

  • pi_start_point_x (float) –

  • pi_start_point_y (float) –

  • pi_start_point_z (float) –

  • pi_end_point_x (float) –

  • pi_end_point_y (float) –

  • pi_end_point_z (float) –

  • pi_constraint_type (str) –

Return type:

None

set_target_plane(pi_object: Reference, pi_origin_x: float, pi_origin_y: float, pi_origin_z: float, pi_normal_x: float, pi_normal_y: float, pi_normal_z: float, pi_constraint_type: str) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetTargetPlane(Reference piObject,
double piOriginX,
double piOriginY,
double piOriginZ,
double piNormalX,
double piNormalY,
double piNormalZ,
CATBSTR piConstraintType)

Set the target plane to follow. This method establishes a contact or
coincidence constraint between the end effector and the
plane.

Parameters:

piConstraintElement
A reference to the target object
This target object must be the product (

CATIAProduct) associated with the constraint.
piOriginX
The x coordinate of the origin of the plane, relatively to the father
object.
piOriginY
The y coordinate of the origin of the plane, relatively to the father
object.
piOriginZ
The z coordinate of the origin of the plane, relatively to the father
object.
piNormalX
The x coordinate of the normal vector of the plane, relatively to the
father object.
piNormalY
The y coordinate of the normal vector of the plane, relatively to the
father object.
piNormalZ
The z coordinate of the normal vector of the plane, relatively to the
father object.
piConstraintType
The type of the constraint.
This parameter can take the values “Contact”, “Contact2D”, “Contact3D”
or “Coincidence”.
Parameters:
  • pi_object (Reference) –

  • pi_origin_x (float) –

  • pi_origin_y (float) –

  • pi_origin_z (float) –

  • pi_normal_x (float) –

  • pi_normal_y (float) –

  • pi_normal_z (float) –

  • pi_constraint_type (str) –

Return type:

None

set_target_point(pi_object: Reference, pi_coord_x: float, pi_coord_y: float, pi_coord_z: float) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetTargetPoint(Reference piObject,
double piCoordX,
double piCoordY,
double piCoordZ)

Set the target point to follow. This method establishes a contact
constraint between the end effector and the point.

Parameters:

piConstraintElement
A reference to the target object
This target object must be the product (

CATIAProduct) associated with the constraint.
piCoordX
The x coordinate of the point, relatively to the father object.

piCoordY
The y coordinate of the point, relatively to the father object.

piCoordZ
The z coordinate of the point, relatively to the father object.
Parameters:
  • pi_object (Reference) –

  • pi_coord_x (float) –

  • pi_coord_y (float) –

  • pi_coord_z (float) –

Return type:

None

property start_segment: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property StartSegment() As CATBSTR

Returns or sets the first segment of the body to be driven
by this constraint.
Return type:

str

property transfer_with_target: bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property TransferWithTarget() As boolean

Returns or sets the Transfer With Target property.
Return type:

bool

property user_type: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property UserType() As CATBSTR (Read Only)

Returns the user type of the constraint. The user type returned will be one
of the following: (“Contact”, “Coincidence”, “Fix”, or “FixOn”),
Return type:

str