pycatia.kinematics_interfaces.mechanism

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.kinematics_interfaces.mechanism.Mechanism(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
Mechanism

Interface to access the Mechanism object.
add_command(i_cmd_type: str, i_joint: Joint) MechanismCommand

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func AddCommand(CATBSTR iCmdType,
Joint iJoint) As MechanismCommand

Adds a command in the mechanism, on a joint.

Parameters:

iCmdType
The command type.
iJoint
The joint to be driven.
oNewCommand
The newly created command.
Parameters:
  • i_cmd_type (str) –

  • i_joint (Joint) –

Return type:

MechanismCommand

add_joint(i_joint_type: str, i_list_elem: tuple) Joint

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func AddJoint(CATBSTR iJointType,
CATSafeArrayVariant iListElem) As Joint

Adds a joint in the mechanism.

Parameters:

iJointType
The joint type.
iListElem
The list of elements expected to locate the joint, depending on the
type.
oNewJoint
The newly created joint.
Parameters:
  • i_joint_type (str) –

  • i_list_elem (tuple) –

Return type:

Joint

property commands: MechanismCommands

Note

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

Returns the collection of commands in the mechanism.

Parameters:

oCommands
The collection of commands. This property is read only because
because list is aggregated in the Mechanism
Return type:

MechanismCommands

property fixed_part: Product

Note

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

Returns or sets the fixed part of the mechanism.

Parameters:

oFixedPart
The fixed part.
Return type:

Product

get_command_values(io_cmd_values: tuple) None

Note

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

Allows to retrieve current state of the mechanism.

Parameters:

ioCmdValues
current command values
Parameters:

io_cmd_values (tuple) –

Return type:

None

get_product(i_index: int) Product

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetProduct(long iIndex) As Product

Returns an item from the list of the products involved in the
mechanism.

Parameters:

iIndex
The index for the product.
oProduct
The product at that index.

Returns:
HRESULT
Parameters:

i_index (int) –

Return type:

Product

get_product_motion(i_product: Product, io_motion: tuple) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetProductMotion(Product iProduct,
CATSafeArrayVariant ioMotion)

Retrieves motion from initial state to current state for a part of the
mechanism.

Parameters:

iProduct
The moving product
ioMotion
The motion matrix (12 real values, compatible with the Move object)


See also:
Move
Parameters:
  • i_product (Product) –

  • io_motion (tuple) –

Return type:

None

property joints: Joints

Note

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

Returns the collection of joints in the mechanism.

Parameters:

oJoints
The collection of joints. This property is read only because
because list is aggregated in the Mechanism
Return type:

Joints

property nb_commands: int

Note

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

Returns the number of commands in the mechanism.

Parameters:

oNbCommands
The number of commands. This property is read only because number
depends on commands creation/destruction
Return type:

int

property nb_dof: int

Note

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

Returns the degree of freedom of the mechanism.

Parameters:

oNbDof
The degree of freedom. This property is read only because because
it depends on joints and commands
Return type:

int

property nb_joints: int

Note

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

Returns the number of joints in the mechanism.

Parameters:

oNbJoints
The number of joints. This property is read only because number
depends on joints creation/destruction
Return type:

int

property nb_products: int

Note

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

Returns the number of products (i.e. bodies) involved in the
mechanism.

Parameters:

oNbProducts
The number of products. This property is read only because number
depends on joints creation/destruction
Return type:

int

put_command_values(i_cmd_values: tuple) None

Note

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

Triggers immediate mechanism solving (motion is NOT applied to the
model).

Parameters:

iCmdValues
command values to be solved for
Parameters:

i_cmd_values (tuple) –

Return type:

None

put_command_values_with_multi_steps(i_cmd_values: tuple, i_nb_steps: int, o_step_reached: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub PutCommandValuesWithMultiSteps(CATSafeArrayVariant
iCmdValues,
long iNbSteps,
long oStepReached)

Puts command values in given number of steps. Visualization is updated
after every step.

Parameters:

iCmdValues
Array of target command values (position to achieve)

inbSteps
Number of steps in witch the target command value is to be
reached.
Legal values

inbSteps greater than 0
Number of step must be greater than zero.
oStepReached
Number of steps reached successfully.
Parameters:
  • i_cmd_values (tuple) –

  • i_nb_steps (int) –

  • o_step_reached (int) –

Return type:

None

reset_cmd_value_to_zero(i_command: MechanismCommand) None

Note

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

Sets the command value to zero for the given command without disturbing
part positions.

Parameters:

iCommand
The command to reset to zero
Parameters:

i_command (MechanismCommand) –

Return type:

None

update() None

Note

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

Reassembles the mechanism after dimension changes in the parts.
Return type:

None