Constraint (hwx.inspire.core)¶

A constraint is used to hold a part so it doesn’t displace when loads are applied to it.

You can apply a constraint to a single point on the model, to an edge or a face, or at the center of a hole.

Attributes¶

 active: Bool color: Color connectionRadius: Double connectionType: Enum direction: Direction distributed: Bool dofs: Attribute features: Attribute localToPart: Bool location: Location mode: Enum name: Attribute part: Attribute parts: Attribute visible: Bool

Public Methods¶

 applyToCylindricalHoleCenter (self) applyToFace (self) applyToPoint (self) setDefaultDOFs (self) updatePosition (self, m44)

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.

color : Color¶

The color assigned to the Boundary Condition.

The search radius for the Boundary Condition.

connectionType : Enum (rigid, flexible)¶

The type of the connection. Valid choices are:

• rigid
• flexible

direction : Direction¶

Returns direction vector of the entity.

distributed : Bool¶

Returns whether the applied boundary condition is distributed or not.

Boundary conditions applied across the entire feature area (for faces) or length (for edges) are distributed and at a single point boundary conditions are non-distributed.

dofs : Attribute¶

Returns or sets a list with the unconstrained degrees of freedom.

To set it you can pass a list e.g [“rx”, “ry”, “rz”], a space seperated string “rx ry rz” or one of the following choices “fixed”, “sliding”, “hinged”.

features : Attribute¶

Returns a list of features the entity is applied to.

localToPart : Bool¶

Returns or sets ‘Rotate with part’.

It makes boundary condition not to rotate or rotate along with its associated part.

location : Location (units=”length”)¶

Returns the location of the entity.

mode : Enum (direction, components)¶

Specifies the mode of the boundary condition.

Valid choices are:

• direction
• components

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.

part : Attribute¶

Returns the part on which the entity is applied graphically.

parts : Attribute¶

Returns a list of parts on which the entity is applied on.

visible : Bool¶

Determines whether the Boundary Condition is visible or not.

Property Details¶

detached()

Determines if the constraint is defined on a detached location in space.

fixed()

Returns True if support is fixed, applies to holes or surfaces.

When the property is set to False then the support dofs get set to default.

For surface supports it means that all translational DOFs are constrained. For supports in holes it means that all DOFs are constrained.

hinge()

Returns True if support is hinge, applies to holes only.

When the property is set to False then the support dofs get set to default.

Hinge supports allow a part to freely rotate about the center-line of a cylindrical face but constrains movement in both the radial and axial directions. Hinge supports can only be applied to full or partial cylindrical faces.

position()

Returns and sets the position of the constraint as a M44 matrix.

sliding()

Returns True if support is sliding, applies to holes or surfaces.

When the property is set to False then the support dofs get set to default.

A sliding support enforces zero displacement in directions normal to the surface direction. Displacements tangent to the surface are unconstrained.

Method Details¶

applyToCylindricalHoleCenter(self)

Sets support to act in a single direction across a cylindrical hole center.

applyToFace(self)

Sets support to act in a single direction across the extent of a face.

applyToPoint(self)

Sets support to act in a single direction at a point

setDefaultDOFs(self)

Sets supports DOFS to default.

Default for supports in a hole or two dimensional parts are all constrained, while for the rest it’s rotational DOFs constrained.

updatePosition(self, m44)

Update the position by multiplying input M44 matrix.