State
- class cee.usg.State()
A state connects a geometry to the results (scalar, vector, displacement and transformations) for a given time, frequency, load case etc.
A model can have an arbitrary number of states, but only one can be shown at any given time.
To create an animation you can create multiple states, and then only change the
UnstructGridModel.currentStateIndexproperty to advance the animation.A state must have one and only one geometry.
The state can also have a scalar, vector, displacement and transformation result.
For the results, you only have to specify the results for the parts that have results. Results are mapped to part via the zero based part index.
Accessors
geometrynamereferenceValue
Methods
Accessors
- cee.usg.geometry()
The one and only geometry in this state
- Return type:
Geometry
- cee.usg.geometry(geometry)
- Arguments:
geometry (
Geometry) – None
- Return type:
void
- cee.usg.name()
The user defined name of the state
- Return type:
string
- cee.usg.name(name)
- Arguments:
name (
string) – None
- Return type:
void
- cee.usg.referenceValue()
The user defined reference value of the state (time, frequency, load case index, etc)
- Return type:
number
- cee.usg.referenceValue(value)
- Arguments:
value (
number) – None
- Return type:
void
Methods
getBoundingBox
- State.getBoundingBox()
Returns the
BoundingBox(in world coordinates) of the model.- Return type:
BoundingBox
getFringesResultRange
- State.getFringesResultRange()
Get the min/max value of the scalar result in this part.
- Return type:
Range
getPartDisplacementsAt
- State.getPartDisplacementsAt(partIndex)
- Arguments:
partIndex (
number) – None
Get the displacement result at the given zero based index
- Return type:
PartDisplacements
getPartFringesAt
- State.getPartFringesAt(partIndex)
- Arguments:
partIndex (
number) – None
Returns the
PartScalarsdefining the fringes result shown on the given part- Return type:
PartScalars
getPartTransformationAt
- State.getPartTransformationAt(partIndex)
- Arguments:
partIndex (
number) – None
Get the transformation matrix for the given part in this state
- Return type:
Mat4
getPartVectorsAt
- State.getPartVectorsAt(partIndex)
- Arguments:
partIndex (
number) – None
Returns the
PartVectorsdefining the vector result shown on the given part- Return type:
PartVectors
getVectorLengthRange
- State.getVectorLengthRange()
The range (min/max) of the vector lengths in all parts
- Return type:
Range
removeAllPartDisplacements
- State.removeAllPartDisplacements()
Remove all displacement results in this state
- Return type:
void
removeAllPartFringes
- State.removeAllPartFringes()
Remove all scalar fringes results from this state
- Return type:
void
removeAllPartTransformations
- State.removeAllPartTransformations()
Remove the transformation matrices for all parts in this state
- Return type:
void
removeAllPartVectors
- State.removeAllPartVectors()
Remove all vector results for all parts in this state
- Return type:
void
setPartDisplacementsAt
- State.setPartDisplacementsAt(partIndex, partDisplacements)
- Arguments:
partIndex (
number) – NonepartDisplacements (
PartDisplacements) – None
Set the displacement result for the given part in this state
Note: The
PartSettings.displacementVisibleproperty must be true to show the result (default true)- Return type:
void
setPartFringesAt
- State.setPartFringesAt(partIndex, partFringes)
- Arguments:
partIndex (
number) – NonepartFringes (
PartScalars) – None
Set the scalar result that should be shown as fringes for the given part in this state.
Note: The
PartSettings.fringesVisibleproperty must be true to show the result (default true)- Return type:
void
setPartTransformationAt
- State.setPartTransformationAt(partIndex, partTransformationMatrix)
- Arguments:
partIndex (
number) – NonepartTransformationMatrix (
Mat4) – None
Set the transformation result (matrix) for the given part in this state.
- Return type:
void
setPartVectorsAt
- State.setPartVectorsAt(partIndex, partVectors)
- Arguments:
partIndex (
number) – NonepartVectors (
PartVectors) – None
Set the vector result that should be shown as vector arrows for the given part in this state.
Note: The
PartSettings.vectorsVisibleproperty must be true to show the result (default true)- Return type:
void