forked from dlubal-software/RFEM_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_plausiblityCheck.py
More file actions
46 lines (36 loc) · 1.18 KB
/
Copy pathtest_plausiblityCheck.py
File metadata and controls
46 lines (36 loc) · 1.18 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
43
44
45
46
import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
from RFEM.TypesForNodes.nodalSupport import NodalSupport, NodalSupportType
from RFEM.BasicObjects.member import Member
from RFEM.BasicObjects.node import Node
from RFEM.BasicObjects.section import Section
from RFEM.BasicObjects.material import Material
from RFEM.initModel import Model
from RFEM.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 Sections
Section(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()
check = PlausibilityCheck()
assert check.message == 'Success'
assert check.errormessage == ''
assert check.IsModelOK()
assert check.GetErrorMessage() == ''