============================= 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 | +---------------------------+---------------------------+---------------------------+ ---------- Properties ---------- +-----------+-----------+-----------+ | detached_ | fixed_ | hinge_ | +-----------+-----------+-----------+ | position_ | sliding_ | | +-----------+-----------+-----------+ -------------- Public Methods -------------- +--------------------------------------+ | applyToCylindricalHoleCenter_ (self) | +--------------------------------------+ | applyToFace_ (self) | +--------------------------------------+ | applyToPoint_ (self) | +--------------------------------------+ | setDefaultDOFs_ (self) | +--------------------------------------+ | updatePosition_ (self, m44) | +--------------------------------------+ ----------------- Attribute Details ----------------- .. _active: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ active : :ref:`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 : :ref:`Color ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The color assigned to the Boundary Condition. .. _connectionRadius: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ connectionRadius : :ref:`Double ` (units="length") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The search radius for the Boundary Condition. .. _connectionType: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ connectionType : :ref:`Enum ` (rigid, flexible) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The type of the connection. Valid choices are: - rigid - flexible .. _direction: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ direction : :ref:`Direction ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns direction vector of the entity. .. _distributed: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ distributed : :ref:`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: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dofs : :ref:`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: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ features : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns a list of features the entity is applied to. .. _localToPart: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ localToPart : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns or sets 'Rotate with part'. It makes boundary condition not to rotate or rotate along with its associated part. .. _location: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ location : :ref:`Location ` (units="length") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns the location of the entity. .. _mode: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mode : :ref:`Enum ` (direction, components) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Specifies the mode of the boundary condition. Valid choices are: - direction - components .. _name: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ name : :ref:`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: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ part : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns the part on which the entity is applied graphically. .. _parts: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ parts : :ref:`Attribute ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns a list of parts on which the entity is applied on. .. _visible: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ visible : :ref:`Bool ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Determines whether the Boundary Condition is visible or not. ---------------- Property Details ---------------- .. _detached: .. method:: detached Determines if the constraint is defined on a detached location in space. .. _fixed: .. method:: 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: .. method:: 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: .. method:: position Returns and sets the position of the constraint as a M44 matrix. .. _sliding: .. method:: 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: .. method:: applyToCylindricalHoleCenter(self) Sets support to act in a single direction across a cylindrical hole center. .. _applyToFace: .. method:: applyToFace(self) Sets support to act in a single direction across the extent of a face. .. _applyToPoint: .. method:: applyToPoint(self) Sets support to act in a single direction at a point .. _setDefaultDOFs: .. method:: 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: .. method:: updatePosition(self, m44) Update the position by multiplying input M44 matrix.