================================== TorsionSpring (hwx.inspire.motion) ================================== Creates a Torsion Spring. Torsion Springs are used to apply a rotational spring-damper force about the pivot axis for two parts. Torsion Springs provide a angular resistance and/or damping between two objects. Changing any one of preload, installedLength, freeLength, or k will influence the other values: - Changing preload modifies freeLength. - Changing installedLength, k, or freeLength modifies preload. Inherits: - :ref:`MotionConnector (hwx.inspire.motion)` ---------- Attributes ---------- +----------------------------+----------------------------+----------------------------+ | active_: Bool | centerlineJoint_: Enum | clevisPinHoles_: Attribute | +----------------------------+----------------------------+----------------------------+ | coilColor_: Color | coils_: Int | connectionRadius_: Double | +----------------------------+----------------------------+----------------------------+ | ct_: Double | ctlinear_: Bool | ctspline_: Attribute | +----------------------------+----------------------------+----------------------------+ | ctsplineMethod_: Enum | damperColor_: Color | diameter_: Double | +----------------------------+----------------------------+----------------------------+ | direction_: Direction | entity1_: Attribute | entity2_: Attribute | +----------------------------+----------------------------+----------------------------+ | factor_: Double | flipAxis_: Bool | freeAngle_: Double | +----------------------------+----------------------------+----------------------------+ | installedAngle_: Double | joint_: Attribute | kt_: Double | +----------------------------+----------------------------+----------------------------+ | ktlinear_: Bool | ktspline_: Attribute | ktsplineMethod_: Enum | +----------------------------+----------------------------+----------------------------+ | location1_: Location | location2_: Location | locked_: Bool | +----------------------------+----------------------------+----------------------------+ | name_: Attribute | parts_: Attribute | preload_: Double | +----------------------------+----------------------------+----------------------------+ | restrainCenterline_: Bool | reverseDirection_: Bool | rotation_: Double | +----------------------------+----------------------------+----------------------------+ | type_: Enum | visible_: Bool | wireDiameter_: Double | +----------------------------+----------------------------+----------------------------+ | writePlantSignals_: Bool | | +----------------------------+---------------------------------------------------------+ ---------- Properties ---------- +------------------+------------------+------------------+ | axleConnection_ | axleDirection_ | axleLocation_ | +------------------+------------------+------------------+ | hasDamper_ | hasSpring_ | mountConnection_ | +------------------+------------------+------------------+ -------------- Public Methods -------------- +--------------------------------------------------+ | classmethod isValidConnection_ (cls, connection) | +--------------------------------------------------+ | getArmEnds_ (self, local=False, offset=1) | +--------------------------------------------------+ | getArmLength_M_ (self) | +--------------------------------------------------+ | getInstalledArmPosition_M_ (self) | +--------------------------------------------------+ | getMountArmPosition_M_ (self) | +--------------------------------------------------+ ----------------- Attribute Details ----------------- .. _active: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ active : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns or sets the object activeness. Setting this on or off sets all children. Setting to True sets all the parents active too. .. _centerlineJoint: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ centerlineJoint : :ref:`Enum ` (CYLINDRICAL, REVOLUTE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies what type of joint to be created if Restrain Centerline is enabled. .. _clevisPinHoles: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ clevisPinHoles : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Lists all the cylindrical features from a clevis pin part, that has 3 aligned holes and outside two holes are in the same part. .. _coilColor: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ coilColor : :ref:`Color ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the color of the coils around the spring. .. _coils: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ coils : :ref:`Int ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Number of coils in the spring, defaults to 5. This is not specifiable if the spring is of type Damper. .. _connectionRadius: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ connectionRadius : :ref:`Double ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the radius of the connection. .. _ct: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ct : :ref:`Double ` (units="torsion_damping") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The torsional damping rate of the spring, defaults to 0.001 N*m*s/rad .. _ctlinear: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ctlinear : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Enables linear damping with the value specified for property ct, else uses interpolation methods to get damping value. .. _ctspline: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ctspline : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _ctsplineMethod: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ctsplineMethod : :ref:`Enum ` (AKIMA, CUBIC, LINEAR) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the type of interpolation method to use. Types can be Akima, Cubic or Linear. .. _damperColor: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ damperColor : :ref:`Color ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the color of the damper of the spring. .. _diameter: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diameter : :ref:`Double ` (units="length") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Used to change the diameter of the torsion spring. .. _direction: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ direction : :ref:`Direction ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The direction of the torsion spring wrt to axle connection. .. _entity1: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entity1 : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the feature or Joint where the torsion spring axle is attached to. .. _entity2: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entity2 : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the feature or Joint where the torsion spring mount is attached to. .. _factor: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ factor : :ref:`Double ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Used to update the length of torsion spring axis on basis of its radius. .. _flipAxis: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ flipAxis : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Allows to flip the axis of the object. .. _freeAngle: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ freeAngle : :ref:`Double ` (units="angle") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The angle of the spring in its resting state, defaults to 0 deg. .. _installedAngle: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ installedAngle : :ref:`Double ` (units="angle") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The angle of the spring as installed in the mechanism, defaults to 0 deg. .. _joint: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ joint : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _kt: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ kt : :ref:`Double ` (units="torsion_stiffness") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The torsional stiffness rate of the spring, defaults to 0.1 N*m/rad. .. _ktlinear: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ktlinear : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Enables linear stiffness with the value specified for property kt, else uses interpolation methods to get stiffness value. .. _ktspline: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ktspline : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _ktsplineMethod: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ktsplineMethod : :ref:`Enum ` (AKIMA, CUBIC, LINEAR) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the type of interpolation method to use. Types can be Akima, Cubic or Linear. .. _location1: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ location1 : :ref:`Location ` (units="length") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The location of the torsion spring wrt to axle connection. .. _location2: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ location2 : :ref:`Location ` (units="length") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the location of the connector object wrt to entity2. .. _locked: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ locked : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If True, prevents the spring from exerting exert a torque during Motion Analysis. .. _name: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ name : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns or sets the name of the object. It can be any text string, including spaces, although it's best to avoid using the following characters: " ' * ? and $. While these characters are allowed, they could create difficulties when you export the model to other applications. .. _parts: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ parts : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Lists all the parts the object is attached to. .. _preload: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ preload : :ref:`Double ` (units="moment") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the torsional force applied to the spring to reach its free angle.This property is auto computed based on the free angle and the torsional stiffness. .. _restrainCenterline: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ restrainCenterline : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When enabled, the pivot axis of the torsion spring is restrained to essentially create a cylindrical or revolute joint between the parts. .. _reverseDirection: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reverseDirection : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Reverses the direction of the preload torque in the spring. .. _rotation: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rotation : :ref:`Double ` (units="angle") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the angle of rotation from the shaft of the object. .. _type: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type : :ref:`Enum ` (SPRINGDAMPER, SPRING, DAMPER) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the type of Torsion Spring. Torsion Spring can be of type Spring Damper or only Spring or Damper, defaults to Spring Damper. .. _visible: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ visible : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Determines whether the object is visible in the modeling window. Setting this on or off sets all children. Setting to True sets all the parents visible too. .. _wireDiameter: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wireDiameter : :ref:`Double ` (units="length") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use to change the wire diameter of the torsion spring. .. _writePlantSignals: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writePlantSignals : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Generates a plant input and output signal for the torsion spring. ---------------- Property Details ---------------- .. _axleConnection: .. method:: axleConnection Specifies the feature or Joint where the torsion spring axle is attached to. .. _axleDirection: .. method:: axleDirection The direction of the torsion spring wrt to axle connection. .. _axleLocation: .. method:: axleLocation The location of the torsion spring wrt to axle connection. .. _hasDamper: .. method:: hasDamper Specifies if the torsion spring has any dampers. .. _hasSpring: .. method:: hasSpring Specifies if the torsion spring has any springs. .. _mountConnection: .. method:: mountConnection Specifies the feature or Joint where the torsion spring mount is attached to. -------------- Method Details -------------- .. _isValidConnection: .. classmethod:: isValidConnection(cls, connection) Determines if the torsion spring can be created from the Joint. :param connection: A joint object. :type connection: Joint :returns: A valid joint connection. :rtype: bool .. _getArmEnds: .. method:: getArmEnds(self, local=False, offset=1) Get end points of wire arms. :param local: If set to True, returns the end points of the arm wrt to local space, otherwise in-terms of global torsion spring position. :type local: bool :param offset: offset can be passed to get point a little past arm ends which is useful for manipulators. :type offset: int :returns: The end points of the torsion spring arms. :rtype: (Point, Point) .. _getArmLength_M: .. method:: getArmLength_M(self) Returns the distance down the arm for the drag point manipulator. .. _getInstalledArmPosition_M: .. method:: getInstalledArmPosition_M(self) Returns a Matrix44 with an origin at the installed arm end closes to the spring, and the z aligin with the other end. .. _getMountArmPosition_M: .. method:: getMountArmPosition_M(self) Returns a Matrix44 with an origin at the mount arm end closes to the spring, and the z aligin with the other end.