SymmetryConstraint (hwx.inspire)#

class SymmetryConstraint(part, symType, **kwds)#

Bases: BoundaryCondition

Symmetry and Cyclic Shape Controls.

Symmetry and cyclic repetition are used to create optimized shapes with repeating patterns and/or nearly symmetric results. Both are valid for optimization but not analysis. There are two kinds of cyclic shapes: those with symmetric sectors and those with asymmetric sectors.

You can only apply one type of symmetry constraint to a design space.

  • Choose SYMMETRIC to apply symmetry planes to a design space.

  • Choose CYCLIC_SYMMETRIC to apply cyclic symmetric repetition to a design space.

  • Choose CYCLIC to apply cyclic repetition to a design space.

Attribute Table#

Name

Type

activePlanes

List

sectors

Int

type

Enum

Example

from hwx import inspire

model = inspire.newModel()
block = model.createSolidBlock()
bc = inspire.SymmetryConstraint(block, 'SYMMETRIC')
inspire.fitView()

print("Type is: ", bc.type)
print("Initial active planes are: ", bc.activePlanes)
bc.activePlanes = ['FIRST_PLANE', 'THIRD_PLANE']
print("Changed active planes are: ", bc.activePlanes)

bc.type = "CYCLIC"
print("Initial number of sectors is: ", bc.sectors)
bc.sectors = 4
print("Changed number of sectors is: ", bc.sectors)
class SymmetryType(value)#

Bases: Enum

An enumeration.

Attribute Table#

Name

Type

CYCLIC

SymmetryType

CYCLIC_SYMMETRIC

SymmetryType

SYMMETRIC

SymmetryType

class PlaneType(value)#

Bases: Enum

An enumeration.

Attribute Table#

Name

Type

FIRST_PLANE

PlaneType

SECOND_PLANE

PlaneType

THIRD_PLANE

PlaneType

property sectors#

Sets/Gets the number of sectors.

property activePlanes#

Sets/gets the list of planes that symmetry has been applied to.

Valid values are:

  • ‘FIRST_PLANE’

  • ‘SECOND_PLANE’

  • ‘THIRD_PLANE’

property type#

Sets/Gets the type of the symmetric constraint.