Actuator (hwx.inspire.motion)#

class Actuator(self, connection=None, **kwds)#

Bases: MotionConnector

Creates an Actuator.

Actuators drive parts in a translational manner, and can be defined in terms of displacement, velocity, acceleration, or force. It’s a convenient way to apply a time-dependent force to your model.

Attribute Table#

Name

Type

Function

tuple

arrowScale

Double

averageValue

EnumUnion

axis

property

baseRotation

Double

baseScale

Double

coaxial

Bool

coaxialJoint

Enum

connectorMode

property

controller

Bool

controllerType

Enum

cyclic

Double

direction

Direction

dtValue

Double

duration

Double

dwellTime

Double

dwellX

UnitsUnion

dxValue

UnitsUnion

entity1

Reference

entity2

Reference

features

property

finalFrequency

Double

flipAxis

Bool

folder

str

frequency

Double

function

Enum

icVelocity

Double

icon

str

indVarComp

Enum

indVarEntity

Reference

initialFrequency

Double

isHoleBased

property

joint

Reference

kd

Double

ki

Double

kp

Double

lineOfSight

Bool

location

property

location1

Location

location2

Location

locked

Bool

mountColor

Color

mountConnection

Reference

mountLocation

Location

mountPivotAxis

Direction

mountPivotType

Enum

movable

property

penalty

Double

penalty1

Double

phaseShift

Double

profile

ProfileAttribute

profileMode

Enum

reverseDirection

Bool

rotateWithPart

Bool

rotation

Double

sdProfile

SDProfileAttribute

shaftColor

Color

shaftConnection

Reference

shaftDirection

Direction

shaftLocation

Location

shaftRadius

Double

shaftRotation

Double

signalsProfile

EnumUnion

solverVariables

list

span

UnitsUnion

spline

ProfileSpline

splineMethod

Enum

startTime

Double

stepOff

UnitsUnion

stepOn

UnitsUnion

sweepInterval

Double

type

Enum

userFunction

String

userFunctionScale

Double

userFunctionUnits

String

value

EnumUnion

x0

UnitsUnion

x1

UnitsUnion

y0

EnumUnion

y1

EnumUnion

Method Table#

Name

Description

areFeaturesASlot (obj, planes)

Filters out contact-joints that are slots.

getShaftLength (self)

Computes the shaft length for non LOS and non 2 holes cases.

getShaftRadius (self)

Returns the shafts hole radius or the radius attribute.

getTranslationalValue (self)

Return the speed, displacement or acceleration depending on the

isCoaxial (self)

Determines if the actuator axis restrained by a CYLINDRICAL joint.

isLineOfSight (self)

Determines if this is a line of sight actuator.

isValidCandidate (obj)

Determines if an actuator can be created from the passed joint connection.

Example

from hwx import inspire
from hwx.inspire import motion
M44 = inspire.math.Matrix44

model = inspire.newModel()
block1 = model.createSolidBlock()
block2 = model.createSolidBlock(position=M44(origin=(8,0,0)))
block2.ground = True
shaftFt = block1.features[25]
mountFt = block2.features[22]

#---------------------------------------------------------------------------
# Feature based actuator
actuator = motion.Actuator(
   shaftConnection = shaftFt,
   shaftLocation   = shaftFt.location,
   mountConnection = mountFt,
   mountLocation   = mountFt.location,
   value           = 4,
   lineOfSight     = False,
   coaxial         = True,
)
print("actuator.type", actuator.type)
print("actuator.value", actuator.value.guiValue)

assem = inspire.Assembly()
outer = assem.createSolidBlock(z=8, ground=True, transparency=.5)
inner = assem.createSolidCylinder(radius=.3, height=7)
outer.booleanSubtract(inner, keepTools=True)
assem.position = M44(origin=(0,-4,0), zv=(1,0,0))

#---------------------------------------------------------------------------
# Joint based actuator
# Create Joint out of Contact then Actuator out of Joint
model.updateContacts()
joint = inspire.Joint(model.getChild('Contact 1'), type='Cylindrical')
motion.Actuator(joint, value=4)

inspire.fitView()
property type#

Type of Actuation to be performed.

Type can be Displacement, Velocity, Acceleration and Force.

property controller#

If True, sets the behavior of the Actuator specified by function and value properties, else the behavior of the actuator will be driven with hand of god type motion

property value#

Specifies the absolute translational value of the actuator depending upon the type. If type of actuator is:

  • Displacement then the default value is 100 mm.

  • Velocity then the default value is 1 m/s.

  • Acceleration then the default value is 1 m/s2.

  • Force the the default value is 1 N.

property reverseDirection#

If True, reverses the direction of the applied force, defaults to False.

property locked#

If True, the actuator does not actuate during a Motion Analysis, defaults to False.

property rotateWithPart#

The actuator rotates with the attached part during a Motion Analysis, defaults to True.

property lineOfSight#

If True, the direction of the actuation is defined by both shaft and mount location attributes, defaults to False

property mountPivotType#

Specifies how the mount connection attaches to the actuator.

The type can be, Fixed, Spherical or Revolute. This property is only specifiable when lineOfSight is True

property mountPivotAxis#

Specifies the direction of the actuator mount pivot.

This property is only specifiable when mountPivotType is set to Revolute.

property coaxial#

If True, the actuator maintains the direction relative to shaftConnection.

This property is only specifiable when lineOfSight is False

property coaxialJoint#

Creates a joint in the direction of actuation.

CoaxialJoint can be a Cylindrical or Translational. This property is only specifiable when lineOfSight is False

property icVelocity#

The initial velocity of the actuator.

This is specifiable when the type of actuator is Acceleration

property flipAxis#

If True, flips the axis direction of the actuator, defaults to False.

property entity1#

The feature entity actuator is attached to.

property location1#

The location of the actuator wrt shaftConnection.

property direction#

The direction of the actuator wrt shaftConnection.

property entity2#

The second feature entity actuator is attached to.

property location2#

The location of the actuator wrt mountConnection.

This is specifiable when lineOfSight is True.

property shaftConnection#

The feature entity actuator is attached to.

property shaftLocation#

The location of the actuator wrt shaftConnection.

property shaftDirection#

The direction of the actuator wrt shaftConnection.

property mountConnection#

The second feature entity actuator is attached to.

property mountLocation#

The location of the actuator wrt mountConnection.

This is specifiable when lineOfSight is True.

property function#

The type of actuation profile.

The function can be a Step, Step Dwell Step, Single Wave, Oscillating, Swept Sine, Impulse, Ramp, Solver Expression and Table, defaults to Step Dwell Step

property startTime#

The time at which the actuator begins to move during a Motion Analysis.

This is not specifiable when actuator function is of type Solver Expression

property cyclic#

The number of revolution of State dependent variable, when the variable component is cyclic motion.

property duration#

The amount of time the function will take for Step and Impulse.

For Ramp function duration is defined as the amount of time taken by the actuator to achieve the value.

property initialFrequency#

The initial frequency for the actuator function Swept Sine, defaults to 1Hz.

property finalFrequency#

The final frequency for the actuator function Swept Sine, defaults to 1Hz.

property sweepInterval#

The amount of time that should be spent transitioning between the initialFrequency and finalFrequency of a Swept Sine function, defaults to 1s.

property averageValue#

The average value for the actuator when the function is set to Oscillating, defaults to 0.

property phaseShift#

The angular phase shift of the actuator when the function is set to Oscillating, defaults to 0 deg.

property frequency#

Specifies the frequency value in Hz, when the function is set to Oscillating, defaults to 1Hz.

property span#

Specifies the duration of the oscillation, when the function is set to Oscillating or Single Wave, defaults to 2s.

property dtValue#

Specifies the amount of time allowed to blend in and out of the actuation profile.

Specifiable when function is set to Single Wave, Oscillating and Table, defaults to 0.05s.

property dxValue#

Specifies the amount of x allowed to blend in and out of the actuation profile.

Specifiable when function is set to Single Wave, Oscillating and Table, defaults to 0.05s.

property dwellTime#

The amount time of the actuation profile dwells.

Specifiable when function is set to Step Dwell Step, defaults to 1s.

property dwellX#

The amount x of the actuation profile dwells.

Specifiable when function is set to Step Dwell Step, defaults to 1s.

property stepOn#

The amount of x taken to ramp up the Step Dwell Step function, defaults to 0.5s.

property stepOff#

The amount of x taken to ramp up the Step Dwell Step function, defaults to 0.5s.

property userFunction#

A motionsolve user expression that will define the behavior of the actuation.

Specifiable when function is set to Solver Expression, defaults to TIME

property userFunctionScale#

The scaling factor for the user expression.

Specifiable when function is set to Solver Expression.

property userFunctionUnits#

The units for the user expression.

Specifiable when function is set to Solver Expression.

property splineMethod#

Specifies the interpolation method for the actuation profile.

Interploation methods can be Akima, Cubic, Linear. Specifiable when function is set to Table

property controllerType#

The type of controller used to achieve the behavior specified by function and value.

Controller type can be PID or Soft Constraint.

Specifiable when actuator is of type Displacement or Velocity and controller is set to True

property kp#

The amount of restoring force that should be applied to overcome position error.

Specifiable only when controller type is set to PID.

property ki#

This term multiplied by accumulated error represents the integral term of a PID. Having an integral term minimizes the steady state error.

property kd#

The derivative action of a PID controller enhances stability of the control system by predicting the future behavior.

property penalty#

The proportional factor used in the calculation of the restoring force.

Specifiable only when controller type is set to Soft Constraint.

property penalty1#

The derivative factor used in the calculation of the restoring force.

Specifiable only when controller type is set to Soft Constraint.

property shaftRadius#

The radius value for the cylindrical shaft of the actuator.

property shaftColor#

The color for the cylindrical shaft of the actuator.

property mountColor#

The color for the base body of the actuator.

property shaftRotation#

The rotational offset of the actuator shaft.

property rotation#

The rotational offset of the actuator base.

property baseRotation#

The rotational offset of the actuator base.

property baseScale#

The scaling factor used to draw the graphical base body of the actuator.

property arrowScale#

The scaling factor used to draw the graphical arrow of the actuator.

property connectorMode#

Specifies the type of connection used by the actuator.

connectorModes can be,

  • ‘PointToPoint’ if lineOfSight is enabled, otherwise

  • ‘Face’

property features#

Features this Actuator connects to

getTranslationalValue()#

Return the speed, displacement or acceleration depending on the classification of the actuator.

property axis#
Feature-based:

LOS: List of the shaft tip and back end of the body Non LOS: List of the shaft tip and where the shaft meets the body

Joint-based:

The axis points through the hole in the outer part

property location#

Specifies the location of the connector object.

For PointToPoint and hole based Face mode connectors this is the center of the object / axis. For Face mode connectors attached to a non hole face this the location1.

Location is not necessarily the same as the origin of the position.

isLineOfSight()#

Determines if this is a line of sight actuator.

isCoaxial()#

Determines if the actuator axis restrained by a CYLINDRICAL joint.

getShaftRadius()#

Returns the shafts hole radius or the radius attribute.

getShaftLength()#

Computes the shaft length for non LOS and non 2 holes cases.

property movable#

Allow non joint-based actuators to be moved with the move tool