Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default value of results from 0.0 to None to align with the default value in speckle-sharp #240

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 113 additions & 113 deletions src/specklepy/objects/structural/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ class ResultSet1D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet1D"):

class Result1D(Result, speckle_type=STRUCTURAL_RESULTS + "Result1D"):
element: Optional[Element1D] = None
position: float = 0.0
dispX: float = 0.0
dispY: float = 0.0
dispZ: float = 0.0
rotXX: float = 0.0
rotYY: float = 0.0
rotZZ: float = 0.0
forceX: float = 0.0
forceY: float = 0.0
forceZ: float = 0.0
momentXX: float = 0.0
momentYY: float = 0.0
momentZZ: float = 0.0
axialStress: float = 0.0
shearStressY: float = 0.0
shearStressZ: float = 0.0
bendingStressYPos: float = 0.0
bendingStressYNeg: float = 0.0
bendingStressZPos: float = 0.0
bendingStressZNeg: float = 0.0
combinedStressMax: float = 0.0
combinedStressMin: float = 0.0
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 @@ -50,35 +50,35 @@ class ResultSet2D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet2D"):
class Result2D(Result, speckle_type=STRUCTURAL_RESULTS + "Result2D"):
element: Optional[Element2D] = None
position: List
dispX: float = 0.0
dispY: float = 0.0
dispZ: float = 0.0
forceXX: float = 0.0
forceYY: float = 0.0
forceXY: float = 0.0
momentXX: float = 0.0
momentYY: float = 0.0
momentXY: float = 0.0
shearX: float = 0.0
shearY: float = 0.0
stressTopXX: float = 0.0
stressTopYY: float = 0.0
stressTopZZ: float = 0.0
stressTopXY: float = 0.0
stressTopYZ: float = 0.0
stressTopZX: float = 0.0
stressMidXX: float = 0.0
stressMidYY: float = 0.0
stressMidZZ: float = 0.0
stressMidXY: float = 0.0
stressMidYZ: float = 0.0
stressMidZX: float = 0.0
stressBotXX: float = 0.0
stressBotYY: float = 0.0
stressBotZZ: float = 0.0
stressBotXY: float = 0.0
stressBotYZ: float = 0.0
stressBotZX: float = 0.0
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 @@ -88,42 +88,42 @@ class ResultSet3D(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSet3D"):
class Result3D(Result, speckle_type=STRUCTURAL_RESULTS + "Result3D"):
element: Optional[Element3D] = None
position: List
dispX: float = 0.0
dispY: float = 0.0
dispZ: float = 0.0
stressXX: float = 0.0
stressYY: float = 0.0
stressZZ: float = 0.0
stressXY: float = 0.0
stressYZ: float = 0.0
stressZX: float = 0.0
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: Optional[Model] = None
loadX: float = 0.0
loadY: float = 0.0
loadZ: float = 0.0
loadXX: float = 0.0
loadYY: float = 0.0
loadZZ: float = 0.0
reactionX: float = 0.0
reactionY: float = 0.0
reactionZ: float = 0.0
reactionXX: float = 0.0
reactionYY: float = 0.0
reactionZZ: float = 0.0
mode: float = 0.0
frequency: float = 0.0
loadFactor: float = 0.0
modalStiffness: float = 0.0
modalGeoStiffness: float = 0.0
effMassX: float = 0.0
effMassY: float = 0.0
effMassZ: float = 0.0
effMassXX: float = 0.0
effMassYY: float = 0.0
effMassZZ: float = 0.0
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 @@ -132,36 +132,36 @@ class ResultSetNode(Result, speckle_type=STRUCTURAL_RESULTS + "ResultSetNode"):

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