Skip to content

Commit

Permalink
Add optional for float, regarding type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJHe committed Dec 21, 2022
1 parent b75501a commit c91f673
Showing 1 changed file with 114 additions and 114 deletions.
228 changes: 114 additions & 114 deletions src/specklepy/objects/structural/results.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List
from typing import List, Optional

from ..base import Base
from ..geometry import *
Expand All @@ -21,28 +21,28 @@ class ResultSet1D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet1D"):

class Result1D(Result, speckle_type=STRUCTURAL_RESULTS + "Result1D"):
element: Element1D = None
position: float = None
dispX: float = None
dispY: float = None
dispZ: float = None
rotXX: float = None
rotYY: float = None
rotZZ: float = None
forceX: float = None
forceY: float = None
forceZ: float = None
momentXX: float = None
momentYY: float = None
momentZZ: float = None
axialStress: float = None
shearStressY: float = None
shearStressZ: float = None
bendingStressYPos: float = None
bendingStressYNeg: float = None
bendingStressZPos: float = None
bendingStressZNeg: float = None
combinedStressMax: float = None
combinedStressMin: float = None
position: Optional[float] = None
dispX: Optional[float] = None
dispY: Optional[float] = None
dispZ: Optional[float] = None
rotXX: Optional[float] = None
rotYY: Optional[float] = None
rotZZ: Optional[float] = None
forceX: Optional[float] = None
forceY: Optional[float] = None
forceZ: Optional[float] = None
momentXX: Optional[float] = None
momentYY: Optional[float] = None
momentZZ: Optional[float] = None
axialStress: Optional[float] = None
shearStressY: Optional[float] = None
shearStressZ: Optional[float] = None
bendingStressYPos: Optional[float] = None
bendingStressYNeg: Optional[float] = None
bendingStressZPos: Optional[float] = None
bendingStressZNeg: Optional[float] = None
combinedStressMax: Optional[float] = None
combinedStressMin: Optional[float] = None


class ResultSet2D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet2D"):
Expand All @@ -52,35 +52,35 @@ class ResultSet2D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet2D"):
class Result2D(Result, speckle_type=STRUCTURAL_RESULTS + "Result2D"):
element: Element2D = None
position: List
dispX: float = None
dispY: float = None
dispZ: float = None
forceXX: float = None
forceYY: float = None
forceXY: float = None
momentXX: float = None
momentYY: float = None
momentXY: float = None
shearX: float = None
shearY: float = None
stressTopXX: float = None
stressTopYY: float = None
stressTopZZ: float = None
stressTopXY: float = None
stressTopYZ: float = None
stressTopZX: float = None
stressMidXX: float = None
stressMidYY: float = None
stressMidZZ: float = None
stressMidXY: float = None
stressMidYZ: float = None
stressMidZX: float = None
stressBotXX: float = None
stressBotYY: float = None
stressBotZZ: float = None
stressBotXY: float = None
stressBotYZ: float = None
stressBotZX: float = None
dispX: Optional[float] = None
dispY: Optional[float] = None
dispZ: Optional[float] = None
forceXX: Optional[float] = None
forceYY: Optional[float] = None
forceXY: Optional[float] = None
momentXX: Optional[float] = None
momentYY: Optional[float] = None
momentXY: Optional[float] = None
shearX: Optional[float] = None
shearY: Optional[float] = None
stressTopXX: Optional[float] = None
stressTopYY: Optional[float] = None
stressTopZZ: Optional[float] = None
stressTopXY: Optional[float] = None
stressTopYZ: Optional[float] = None
stressTopZX: Optional[float] = None
stressMidXX: Optional[float] = None
stressMidYY: Optional[float] = None
stressMidZZ: Optional[float] = None
stressMidXY: Optional[float] = None
stressMidYZ: Optional[float] = None
stressMidZX: Optional[float] = None
stressBotXX: Optional[float] = None
stressBotYY: Optional[float] = None
stressBotZZ: Optional[float] = None
stressBotXY: Optional[float] = None
stressBotYZ: Optional[float] = None
stressBotZX: Optional[float] = None


class ResultSet3D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet3D"):
Expand All @@ -90,42 +90,42 @@ class ResultSet3D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet3D"):
class Result3D(Result, speckle_type=STRUCTURAL_RESULTS + "Result3D"):
element: Element3D = None
position: List
dispX: float = None
dispY: float = None
dispZ: float = None
stressXX: float = None
stressYY: float = None
stressZZ: float = None
stressXY: float = None
stressYZ: float = None
stressZX: float = None
dispX: Optional[float] = None
dispY: Optional[float] = None
dispZ: Optional[float] = None
stressXX: Optional[float] = None
stressYY: Optional[float] = None
stressZZ: Optional[float] = None
stressXY: Optional[float] = None
stressYZ: Optional[float] = None
stressZX: Optional[float] = None


class ResultGlobal(Result, speckle_type=STRUCTURAL_RESULTS + "ResultGlobal"):
model: Model = None
loadX: float = None
loadY: float = None
loadZ: float = None
loadXX: float = None
loadYY: float = None
loadZZ: float = None
reactionX: float = None
reactionY: float = None
reactionZ: float = None
reactionXX: float = None
reactionYY: float = None
reactionZZ: float = None
mode: float = None
frequency: float = None
loadFactor: float = None
modalStiffness: float = None
modalGeoStiffness: float = None
effMassX: float = None
effMassY: float = None
effMassZ: float = None
effMassXX: float = None
effMassYY: float = None
effMassZZ: float = None
loadX: Optional[float] = None
loadY: Optional[float] = None
loadZ: Optional[float] = None
loadXX: Optional[float] = None
loadYY: Optional[float] = None
loadZZ: Optional[float] = None
reactionX: Optional[float] = None
reactionY: Optional[float] = None
reactionZ: Optional[float] = None
reactionXX: Optional[float] = None
reactionYY: Optional[float] = None
reactionZZ: Optional[float] = None
mode: Optional[float] = None
frequency: Optional[float] = None
loadFactor: Optional[float] = None
modalStiffness: Optional[float] = None
modalGeoStiffness: Optional[float] = None
effMassX: Optional[float] = None
effMassY: Optional[float] = None
effMassZ: Optional[float] = None
effMassXX: Optional[float] = None
effMassYY: Optional[float] = None
effMassZZ: Optional[float] = None


class ResultSetNode(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSetNode"):
Expand All @@ -134,36 +134,36 @@ class ResultSetNode(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSetNode"):

class ResultNode(Result, speckle_type=STRUCTURAL_RESULTS + " ResultNode"):
node: Node = None
dispX: float = None
dispY: float = None
dispZ: float = None
rotXX: float = None
rotYY: float = None
rotZZ: float = None
reactionX: float = None
reactionY: float = None
reactionZ: float = None
reactionXX: float = None
reactionYY: float = None
reactionZZ: float = None
constraintX: float = None
constraintY: float = None
constraintZ: float = None
constraintXX: float = None
constraintYY: float = None
constraintZZ: float = None
velX: float = None
velY: float = None
velZ: float = None
velXX: float = None
velYY: float = None
velZZ: float = None
accX: float = None
accY: float = None
accZ: float = None
accXX: float = None
accYY: float = None
accZZ: float = None
dispX: Optional[float] = None
dispY: Optional[float] = None
dispZ: Optional[float] = None
rotXX: Optional[float] = None
rotYY: Optional[float] = None
rotZZ: Optional[float] = None
reactionX: Optional[float] = None
reactionY: Optional[float] = None
reactionZ: Optional[float] = None
reactionXX: Optional[float] = None
reactionYY: Optional[float] = None
reactionZZ: Optional[float] = None
constraintX: Optional[float] = None
constraintY: Optional[float] = None
constraintZ: Optional[float] = None
constraintXX: Optional[float] = None
constraintYY: Optional[float] = None
constraintZZ: Optional[float] = None
velX: Optional[float] = None
velY: Optional[float] = None
velZ: Optional[float] = None
velXX: Optional[float] = None
velYY: Optional[float] = None
velZZ: Optional[float] = None
accX: Optional[float] = None
accY: Optional[float] = None
accZ: Optional[float] = None
accXX: Optional[float] = None
accYY: Optional[float] = None
accZZ: Optional[float] = None


class ResultSetAll(Base, speckle_type=None):
Expand Down

0 comments on commit c91f673

Please sign in to comment.