pycatia.dnb_human_modeling_interfaces.swk_body

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.swk_body.SWKBody(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.SWKBodyElement
SWKBody

This interface represents the body of the manikin.
It provides access to the manikin structure.
apply_position(pi_position_increment: tuple) None

Note

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

Sets a new relative manikin position.

Parameters:

piPositionIncrement
The new position to combine with the manikin’s current
position.
This array must contain 12 numbers, and msut be initialized using
the four columns of a transformation matrix. The first nine components
represent the rotation matrix.
The last three components represent the translation
vector.

Example:

This example sets the manikin to a 45-degree rotation
around
the x axis and at a (10, 20, 30) translation from the
origin.

Dim myPosition(11)
‘Rotation (45 degrees around the x axis)
myPosition(0) = 1.000
myPosition(1) = 0
myPosition(2) = 0
myPosition(3) = 0
myPosition(4) = 0.707
myPosition(5) = 0.707
myPosition(6) = 0
myPosition(7) = -0.707
myPosition(8) = 0.707
‘Translation vector (10,20,30)
myPosition(9) = 10.000
myPosition(10) = 20.000
myPosition(11) = 30.000
myManikin.Body.ApplyPosition myPosition
Parameters:

pi_position_increment (tuple) –

Return type:

None

property center_of_gravity: SWKCenterOfGravity

Note

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

Returns the center of gravity of the current manikin.
Return type:

SWKCenterOfGravity

property center_of_gravity_displayed: bool

Note

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

Returns or sets the display of the center of gravity.
Return type:

bool

property central_cone_displayed: bool

Note

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

Returns or sets the central cone display of the active line of sight.
Return type:

bool

property cone_type_bounded_cone: bool

Note

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

Returns or sets the cone type display to bounded cone for the peripheral
and central cone.
Return type:

bool

property cone_type_boundings: bool

Note

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

Returns or sets the cone type display to boundings for the peripheral and
central cone.
Return type:

bool

property cone_type_flat: bool

Note

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

Returns or sets the cone type display to flat for the peripheral and
central cone.
Return type:

bool

property cone_type_spherical: bool

Note

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

Returns or sets the cone type display to spherical for the peripheral and
central cone.
Return type:

bool

property ellipses_displayed: bool

Note

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

Returns or sets the display of the manikin ellipses.
Return type:

bool

get_segment(pi_index: int) SWKSegment

Note

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

Returns a specific segment of the body, based on an index.

Parameters:

piIndex
The index of the segment to retrieve.
The first segment is at index 0.
The value of this parameter should not be higher than the number of
segments on the body, minus 1.
Parameters:

pi_index (int) –

Return type:

SWKSegment

is_balanced() bool

Note

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

Returns:
True if the manikin is well-balaned, False otherwise.
Being well balanced means that the center of gravity of the
manikin
falls inside its basis of support, given the manikin’s current posture.
Return type:

bool

property line_of_sight_displayed: bool

Note

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

Returns or sets the display of the active line of sight.
Return type:

bool

lock_posture(pi_dof_id: int) None

Note

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

Lock the body in the given dof
Parameters:

pi_dof_id (int) –

Return type:

None

property memo: str

Note

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

Returns or records miscellaneous user-added comments about the posture.
Return type:

str

property number_of_segments: int

Note

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

Returns the number of segments of the body.
Return type:

int

property peripheral_cone_displayed: bool

Note

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

Returns or sets the peripheral cone display of the active line of sight.
Return type:

bool

property referential: str

Note

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

Returns or sets the referential of the manikin. Possible values are
“HPoint”, “EyePoint”, “LeftFoot”, “RightFoot”, “LowestFoot”, “BetweenFeet” and
“Crotch”. If this manikin is a forearm model, than the possible values are
either “LeftHand” or “RightHand”.

Example:

myManikin.Body.Referential = “LowestFoot”
Return type:

str

property referential_displayed: bool

Note

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

Returns or sets the display of the referential.
Return type:

bool

reset_angular_limitations(pi_dof_id: int, pi_reset: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub ResetAngularLimitations(long piDOFId,
long piReset)

Resets the angular limitations depending on the param piReset: 0 -> 2 OR 3
OR 4 depending of the first encountered. 1 -> 2 AND 3 AND 4 2 -> Unlock the
value 3 -> Restore the angular limitations if it is “No Limits” 4 -> Set back
the angular limitations to their default value (50.0%)
Parameters:
  • pi_dof_id (int) –

  • pi_reset (int) –

Return type:

None

reset_attaches() None

Note

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

Reset the attaches of the body.
Return type:

None

reset_ik_offsets() None

Note

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

Reset the offsets of the body.
Return type:

None

reset_posture() None

Note

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

Set the manikin to the default (standing) posture.
Return type:

None

reset_pref_angles(pi_dof_id: int) None

Note

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

Reset the pref angles of the body.
Parameters:

pi_dof_id (int) –

Return type:

None

property segments_displayed: bool

Note

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

Returns or sets the display of the segments.
Return type:

bool

set_cone_type_bounded_cone() None

Note

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

None

set_cone_type_boundings() None

Note

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

None

set_cone_type_flat() None

Note

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

None

set_cone_type_spherical() None

Note

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

None

set_position(pi_new_position: tuple) None

Note

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

Sets a new absolute manikin position.

Parameters:

piNewPosition
The new position to place the manikin.
This array must contain 12 numbers, and msut be initialized using
the four columns of a transformation matrix. The first nine components
represent the rotation matrix.
The last three components represent the translation
vector.

Example:

This example sets the manikin to a 45-degree rotation
around
the x axis and at a (10, 20, 30) translation from the
origin.

Dim myPosition(11)
‘Rotation (45 degrees around the x axis)
myPosition(0) = 1.000
myPosition(1) = 0
myPosition(2) = 0
myPosition(3) = 0
myPosition(4) = 0.707
myPosition(5) = 0.707
myPosition(6) = 0
myPosition(7) = -0.707
myPosition(8) = 0.707
‘Translation vector (10,20,30)
myPosition(9) = 10.000
myPosition(10) = 20.000
myPosition(11) = 30.000
myManikin.Body.SetPosition myPosition
Parameters:

pi_new_position (tuple) –

Return type:

None

set_posture(pi_posture_spec: int, pi_keep_referential: bool) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetPosture(SWKPostureSpec piPostureSpec,
boolean piKeepReferential)

Set the manikin to a specific predefined posture.
Predefined postures include “Stand”, “Sit”, “Reach”
and “Kneel”.

See also:
SWKPostureSpec
Parameters:

piKeepReferential
keeps the referential after the change of the
posture
Parameters:
  • pi_posture_spec (int) – enum swk_posture_spec

  • pi_keep_referential (bool) –

Return type:

None

set_to_best_posture() None

Note

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

Set the manikin to the posture that will provide it its maximum score.
When the manikin is in that posture, then the output of property
PosturalScore will be the same as that of property MaxPosturalScore.
Return type:

None

property skin_displayed: bool

Note

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

Returns or sets the display of the manikin surfaces (skin).
Return type:

bool

property skin_resolution: int

Note

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

Returns or sets the manikin skin resolution.
The valid values range from 4 to 128.
Return type:

int

swap_angular_limitations(pi_dof_id: int) None

Note

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

Swap the angular limitations of the body.
Parameters:

pi_dof_id (int) –

Return type:

None

swap_posture() None

Note

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

Swap the posture with the equivalent segment, on the other side of the
manikin. For instance, the right leg takes the posture of the left leg, and
vice versa.
Return type:

None

swap_pref_angles(pi_dof_id: int) None

Note

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

Swap the preferred angles of the body.
Parameters:

pi_dof_id (int) –

Return type:

None