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:

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  

Public Methods

classmethod isValidConnection (cls, connection)
getArmEnds (self, local=False, offset=1)
getArmLength_M (self)
getInstalledArmPosition_M (self)
getMountArmPosition_M (self)

Attribute Details

active : 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 : Enum (CYLINDRICAL, REVOLUTE)

Specifies what type of joint to be created if Restrain Centerline is enabled.

clevisPinHoles : 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 : Color

Specifies the color of the coils around the spring.

coils : Int

Number of coils in the spring, defaults to 5.

This is not specifiable if the spring is of type Damper.

connectionRadius : Double

Specifies the radius of the connection.

ct : Double (units=”torsion_damping”)

The torsional damping rate of the spring, defaults to 0.001 N*m*s/rad

ctlinear : Bool

Enables linear damping with the value specified for property ct, else uses interpolation methods to get damping value.

ctspline : Attribute

ctsplineMethod : Enum (AKIMA, CUBIC, LINEAR)

Specifies the type of interpolation method to use.

Types can be Akima, Cubic or Linear.

damperColor : Color

Specifies the color of the damper of the spring.

diameter : Double (units=”length”)

Used to change the diameter of the torsion spring.

direction : Direction

The direction of the torsion spring wrt to axle connection.

entity1 : Attribute

Specifies the feature or Joint where the torsion spring axle is attached to.

entity2 : Attribute

Specifies the feature or Joint where the torsion spring mount is attached to.

factor : Double

Used to update the length of torsion spring axis on basis of its radius.

flipAxis : Bool

Allows to flip the axis of the object.

freeAngle : Double (units=”angle”)

The angle of the spring in its resting state, defaults to 0 deg.

installedAngle : Double (units=”angle”)

The angle of the spring as installed in the mechanism, defaults to 0 deg.

joint : Attribute

kt : Double (units=”torsion_stiffness”)

The torsional stiffness rate of the spring, defaults to 0.1 N*m/rad.

ktlinear : Bool

Enables linear stiffness with the value specified for property kt, else uses interpolation methods to get stiffness value.

ktspline : Attribute

ktsplineMethod : Enum (AKIMA, CUBIC, LINEAR)

Specifies the type of interpolation method to use.

Types can be Akima, Cubic or Linear.

location1 : Location (units=”length”)

The location of the torsion spring wrt to axle connection.

location2 : Location (units=”length”)

Specifies the location of the connector object wrt to entity2.

locked : Bool

If True, prevents the spring from exerting exert a torque during Motion Analysis.

name : 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 : Attribute

Lists all the parts the object is attached to.

preload : 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 : Bool

When enabled, the pivot axis of the torsion spring is restrained to essentially create a cylindrical or revolute joint between the parts.

reverseDirection : Bool

Reverses the direction of the preload torque in the spring.

rotation : Double (units=”angle”)

Specifies the angle of rotation from the shaft of the object.

type : 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 : 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 : Double (units=”length”)

Use to change the wire diameter of the torsion spring.

writePlantSignals : Bool

Generates a plant input and output signal for the torsion spring.

Property Details

axleConnection()

Specifies the feature or Joint where the torsion spring axle is attached to.

axleDirection()

The direction of the torsion spring wrt to axle connection.

axleLocation()

The location of the torsion spring wrt to axle connection.

hasDamper()

Specifies if the torsion spring has any dampers.

hasSpring()

Specifies if the torsion spring has any springs.

mountConnection()

Specifies the feature or Joint where the torsion spring mount is attached to.

Method Details

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(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(self)

Returns the distance down the arm for the drag point manipulator.

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(self)

Returns a Matrix44 with an origin at the mount arm end closes to the spring, and the z aligin with the other end.