Joint (hwx.inspire.Joint)#

class Joint(connection=None, name='', loadCase=None, **kwds)#

Bases: PartsConnector

Joint connect parts together while allowing movement at the joint location.

Every joint has a type, such as Pin or Hinge, and state, which can be set to Locked, Active, or Free.

Attribute Table#

Name

Type

AUTO

str

AllowedContactTypes

list

BALL

str

CONTACT

str

CYLINDRICAL

str

GROUNDED_PIN

str

GROUNDED_SLIDING_PIN

str

HINGE

str

PIN

str

PLANAR

str

SLIDING_PIN

str

TRANSLATIONAL

str

UNKNOWN

str

activeForStaticAnalysis

Bool

angle

Double

axis

property

ballRadius

Double

behavior

Enum

bendingArm

Double

bristleStiffness

Double

c

Double

calculateGeometryParams

Bool

collisionType

Enum

connectionRadius

Double

contact

Reference

contactInfo

property

ct

Double

ctx

Double

cty

Double

ctz

Double

cx

Double

cy

Double

cz

Double

damping

Double

dampingCoefficient

Double

dynamicCoefficient

Double

effectType

Enum

enableFriction

Bool

enableMoment

Bool

enablePreload

Bool

enableReaction

Bool

enableTorsional

Bool

exponent

Double

features

property

frictionArm

Double

graphicScale

Double

hasClip

property

icon

str

initialOverlap

Double

k

Double

keyFeatures

property

kt

Double

ktx

Double

kty

Double

ktz

Double

kx

Double

ky

Double

kz

Double

layerDepth

Double

normalVelocity

Double

overlapDelta

Enum

penalty

Double

penetrationDepth

Double

pinRadius

Double

preloadForce

Double

preloadTorque

Double

rateType

Enum

reactionArm

Double

restitutionCoefficient

Double

solverVariables

property

state

Enum

staticCoefficient

Double

stictionTransitionVelocity

Double

stiffness

Double

viscousCoefficient

Double

Method Table#

Name

Description

Enable (self)

SetAttribute (self, attr, value, *args)

getAllowedTypes (self)

Returns a list of allowed realization types of joint.

getAllowedTypesFromKeyFeatures (keyFeatures)

Return a list of valid joint types for a given keyFeatures.

getConnectionCandidates (keyFeatures, holes=None, visibleOnly=True, parts=None)

Returns a list of objects that are valid connection candidates to create a

getDefaultGraphicScale (self)

getDefaultPosition (self)

resetGraphicScale (self)

resetPosition (self)

Reset location/orientation to the default computed from geometry.

setValues (self, **kwds)

Sets attribute on name and value pairs in order of attributes defined.

Example

from hwx import inspire

model = inspire.newModel()

def blockWithHole(x=1, y=1, z=1, radius=.3):
box = model.createSolidBlock()
cyl = model.createSolidCylinder(radius=radius)
return box.booleanSubtract(cyl)

block1 = blockWithHole()
block2 = blockWithHole()
block2.location = (0, 0, 1.5)
cylFeats1 = block1.getFeatures(type=inspire.FeatureCylindrical)
cylFeats2 = block2.getFeatures(type=inspire.FeatureCylindrical)
holes = [cylFeats1, cylFeats2]

# Create feature-based Joint
joint1 = inspire.Joint(holes)
print("joint1.type", joint1.type)
print("joint1.behavior", joint1.behavior)
print("joint1.state", joint1.state)
assert joint1.parts == [block1, block2]

model.createSolidBlock(location=(2, 0, 0))
model.createSolidBlock(location=(2, 0, 1))
model.updateContacts()
contact = model.contacts[0]

# Create contact-based Joint
joint2 = inspire.Joint(contact)
print("joint2.type", joint2.type)
assert joint2.contact == contact

inspire.fitView()

# View joints in context
from hwx import gui
gui.getAction('core.joints').ison = True
property contact#

Contact object the joint is based on.

If it is None then the joint is hole based.

property state#

Specifies the state of the joint.

It can be set to Locked, Active, or Free.

  • Select Locked to prevent movement in the joint.

  • Select Active to allow the joint to function normally.

  • Select Free if you want the mechanism to behave as if the joint is not there.

property collisionType#

Type of collision upon contact between entities. Collision type can be Impact, Poisson and Volume.

property enableFriction#

Allows to enable friction between the connected parts.

property calculateGeometryParams#

Allows to manually enter dimensions for geometry parameters such as the pin radius, friction arm, and bending arm.

property pinRadius#

Specifies the radius of a pin joint.

property ballRadius#

Specifies the radius of the ball joint.

property reactionArm#

Specifies the value of the reaction value of arm.

property frictionArm#

Specifies the value of the frictional value of arm.

property bendingArm#

Specifies the value of the bending moment value of arm.

property initialOverlap#

Specifies the intial overlap value.

property overlapDelta#

Specifies options to how to overlap delta value for friction.

The options can be “Constant”, “Increase”, or “Decrease”.

property effectType#

Specifies the frictional effect.

The frictional effects can be “Stiction and Sliding”, “Stiction Only” and “Sliding Only”.

By default, both static and dynamic friction are considered. The ‘Stiction Only’ option uses only static friction, while the ‘Sliding Only’ option uses only dynamic friction.

property staticCoefficient#

Specifies the static friction coefficient (µs) of the joint.

property dynamicCoefficient#

Specifies the dynamic friction coefficient (µd) of the joint.

property stictionTransitionVelocity#

Specifies the joint velocity at which the friction effect transitions from dynamic friction to static friction.

property activeForStaticAnalysis#

Allows the joint to be active, during motion analysis set to static.

property bristleStiffness#

Specifies the bristle stiffness value of the joint friction.

property dampingCoefficient#

Specifies the damping friction coefficient of the joint.

property viscousCoefficient#

Specifies the viscous friction coefficient of the joint.

property enablePreload#

Allows to preload value for the joint.

property preloadForce#

Specifies the preload force value of the joint.

property preloadTorque#

Specifies the preload torque value of the joint.

property enableReaction#

Allows to enable reaction of the joint.

property enableMoment#

Allows to enable the bending moment of the joint.

property enableTorsional#

Allows to enable the torsional moment of the joint.

property graphicScale#

Joint graphics diameter.

property stiffness#

The stiffness of the boundary surface interaction. The nonlinear effect of the Exponent parameter will be accounted for automatically. It defaults to 1000 N/m and this property is specifiable when the contact collision is of type Impact.

property damping#

Specifies the maximum damping coefficient. It defaults to 100 N*s/m and this property is specifiable when the contact collision is of type Impact or Volume.

property exponent#

The exponent of the force deformation characteristic.

This value is used to generate the stiffness. It defaults to 2.1 and this property is specifiable when the contact collision type is Impact or Volume.

property penetrationDepth#

The depth beyond which full damping is applied. It defaults to 0.0001 m and this property is specifiable when the contact collision is of type Impact.

property layerDepth#

The layer depth of material. This is used to calculate the contact stiffness and it defaults to 1 m. This property is specifiable when the contact collision is of type Volume.

property penalty#

Determines the local stiffness properties between materials.

Larger values lead to reduced penetration between two bodies. By default penalty value is 5e+06 N/m. This property is specifiable when the contact collision type is Poisson.

property restitutionCoefficient#

The ratio of the final to initial relative velocity between two entities after they collide.

  • 0 for a perfectly plastic collision

  • 1 for a perfectly elastic collision

By default the value is 0.8. This property is specifiable when the contact collision type is Poisson.

property normalVelocity#

Velocity limit after which full damping force is applied.

By default the value is 0.001. This property is specifiable when the contact collision type is Poisson.

property connectionRadius#

The search radius for the connector.

setValues(**kwds)#

Sets attribute on name and value pairs in order of attributes defined.

property keyFeatures#

General classification of referenced features by the joint.

It can be

  • Aligned holes

  • Single Holes

  • Cylindrical Pairs

  • Spherical Pairs

  • Planar Pairs

  • Multi-Planar Pairs

  • Unknown Pairs

getAllowedTypes()#

Returns a list of allowed realization types of joint.

This is a subset of type depending on the contact.

property features#

List of features used in the joint.

property contactInfo#

Returns a dictionary with contact information of the joint.

resetPosition()#

Reset location/orientation to the default computed from geometry.

property axis#

List of points along the axis of the joint.

property hasClip#

Determines whether the joint have a clip preventing translation along the hole axis.

Will be True for Pin based joint types and False for Sliding Pin based joint types. Not applicable for contact based joints.

property behavior#

Specifies the behavior of the joint. It can be Default, Rigid or Flexible.

If value is ‘Default’ then the behavior should be realized off a global default setting.

Flexibility of the joint can be specified using k, kt, c, ct properties.

property rateType#

Specifies type of rate used by the joint.

It can be Global, Basic or Advanced Rates.

property k#

Specifies the stiffness value.

property kt#

Specifies the torsional stiffness value

property c#

Specifies the damping value.

property ct#

Specifies the torsional damping value.

property angle#

Specifies the rotational value about the axis.

property kx#

Specifies the stiffness in the X direction.

property ky#

Specifies the stiffness in the Y direction.

property kz#

Specifies the stiffness in the Z direction.

property cx#

Specifies the damping in the X direction.

property cy#

Specifies the damping in the Y direction.

property cz#

Specifies the damping in the Z direction.

property ktx#

Specifies the torsional stiffness in the X direction.

property kty#

Specifies the torsional stiffness in the Y direction.

property ktz#

Specifies the torsional stiffness in the Z direction.

property ctx#

Specifies the torsional damping in the X direction.

property cty#

Specifies the torsional damping in the Y direction.

property ctz#

Specifies the torsional damping in the Z direction.