ProtoTwin API
    Preparing search index...

    Class Mechanism

    Kinematic Mechanism.

    Used by the RobotControllerComponent to calculate the inverse kinematics for industrial robots. Supports closed kinematic loops and multiple goals. Users should generally use the robot controller component instead.

    Index

    Constructors

    Accessors

    • get goals(): readonly Goal[]

      The goals to be solved.

      Returns readonly Goal[]

    Methods

    • Builds the mechanism.

      Parameters

      • optimize: boolean

        Whether to optimize the mechanism for improved runtime performance.

      Returns void

      Optimization may take a few milliseconds, but the mechanism will solve faster. The mechanism must be rebuilt after adding or removing links, joints, or goals. The mechanism must be rebuilt after changing the objective of a goal.

    • Releases the mechanism.

      Returns void

      IMPORTANT! Must be called when the mechanism is no longer needed (e.g. from inside Component.removed), to free native resources.

    • Removes a goal.

      Parameters

      • goal: Goal

        The goal.

      Returns boolean

      True if the goal was removed, false otherwise.

    • Solves the mechanism.

      Returns number

      The objective function penalty.