DisplacementConstraint (hwx.inspire)#

class DisplacementConstraint(features, location=None, upperBound=0.01, lowerBound=-0.01, name='', isRemote=False, **kwds)#

Bases: BoundaryCondition

Displacement constraints can be applied to a model to limit deflections in desired locations and directions.

Attribute Table#

Name

Type

boundDirection

Enum

connectionType

Enum

direction

Direction

hasLowerBound

Bool

hasUpperBound

Bool

lowerBound

Double

position

property

upperBound

Double

Method Table#

Name

Description

updatePosition (self, m44)

Update the position by multiplying input M44 matrix.

Example

from hwx import inspire

model = inspire.newModel()
sheet = model.createSheetRectangle()
planarFeature = sheet.features[8]
dispConstraint = inspire.DisplacementConstraint(
  planarFeature, boundDirection="all", upperBound=0.01, loadCase='current'
)

# show some properties
print("Some Displacement Contraint properties:")
print("Bound Direction: " + str(dispConstraint.boundDirection))
print("Has Upper Bound: " + str(dispConstraint.hasUpperBound))
print("Upper Bound: " + str(dispConstraint.upperBound))
print("Has Lower Bound: " + str(dispConstraint.hasLowerBound))
print("Lower Bound: " + str(dispConstraint.lowerBound))

# modify some properties
dispConstraint.boundDirection = "one"
dispConstraint.upperBound = 0.025
dispConstraint.lowerBound = 0.01

inspire.fitView()

# show modified properties
print("")
print("Displacement Contraint properties after modification:")
print("Bound Direction: " + str(dispConstraint.boundDirection))
print("Upper Bound: " + str(dispConstraint.upperBound))
print("Lower Bound: " + str(dispConstraint.lowerBound))
property boundDirection#

Limit to a sphere (all) or along a line (one). Valid choices are:

  • all

  • one

property hasUpperBound#

Determines whether it has an upper bound.

property upperBound#

Limit sphere radius if boundDirection==all or upper limit

property hasLowerBound#

Determines whether it has a lower bound.

property lowerBound#

The lower limit.

Ignored if boundDirection==all

property connectionType#

The type of the connection. Valid choices are:

  • Rigid

  • Flexible

property position#

The location and orientation.

Type:

Matrix44

property direction#

Determines the z axis of the position along which limits are applied if boundDirection is one.

updatePosition(m44)#

Update the position by multiplying input M44 matrix.