ShapeVariable (hwx.inspire.PolyNURBS)#
- class ShapeVariable(pointDirections, **kwds)#
Bases:
GeneralPhysical
Define which directions PolyNURBS cage points can move during PolyNURBS optimization.
# Name
Type
property
property
# Name
Description
getFeatures
(self)Returns a list of all features of ShapeVariable.
Example
from hwx import inspire model = inspire.newModel() part = inspire.PolyNURBS.createBrick(x=1, y=2, z=3) featurePoints = part.getFeatures(inspire.FeaturePoint) # select existing cage points, allowing them to move in # a specified direction during optimization sv1 = inspire.ShapeVariable( {featurePoints[0]: [0, 0, 1], featurePoints[1]: [0, 1, 0]} ) # To allow these cage points to move in different directions # we must create multiple shape variables. sv2 = inspire.ShapeVariable( {featurePoints[0]: [0, 1, 0], featurePoints[1]: [0, 0, 1]} )
- property features#
A list of all features of ShapeVariable.
- getFeatures()#
Returns a list of all features of ShapeVariable.
- property pointDirections#
A dictionary representation of each FeaturePoint direction
- Returns:
dict[FeaturePoint, math.Vector]