forked from dlubal-software/RSTAB_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_plausiblityCheck.py
More file actions
42 lines (32 loc) · 1.06 KB
/
Copy pathtest_plausiblityCheck.py
File metadata and controls
42 lines (32 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
from RSTAB.TypesForNodes.nodalSupport import NodalSupport, NodalSupportType
from RSTAB.BasicObjects.member import Member
from RSTAB.BasicObjects.node import Node
from RSTAB.BasicObjects.crossSection import CrossSection
from RSTAB.BasicObjects.material import Material
from RSTAB.initModel import Model
from RSTAB.Tools.PlausibilityCheck import PlausibilityCheck
if Model.clientModel is None:
Model()
def test_plausibility_check():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
# Create Material
Material(1, 'S235')
# Create Cross Sections
CrossSection(1, 'HEA 240', 1)
# Create Nodes
Node(1, 0, 0, 0)
Node(2, 6, 0, 0)
# Create Members
Member(1, 1, 2, 0, 1, 1)
# Create Nodal Supports
NodalSupport(1, '1', NodalSupportType.FIXED)
Model.clientModel.service.finish_modification()
PlausibilityCheck()