forked from dlubal-software/RFEM_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_BaseSettings_test.py
31 lines (26 loc) · 1.17 KB
/
test_BaseSettings_test.py
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
import sys
import os
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
from RFEM.enums import GlobalAxesOrientationType, LocalAxesOrientationType
from RFEM.baseSettings import BaseSettings
from RFEM.initModel import Model
if Model.clientModel is None:
Model()
def test_baseSettings():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
# Set Base Settings
BaseSettings(12, GlobalAxesOrientationType.E_GLOBAL_AXES_ORIENTATION_ZUP, LocalAxesOrientationType.E_LOCAL_AXES_ORIENTATION_ZUP, [0.001, 0.002, 0.003, 0.004])
Model.clientModel.service.finish_modification()
msao = Model.clientModel.service.get_model_settings_and_options()
assert msao.gravitational_acceleration == 12
assert msao.global_axes_orientation == 'E_GLOBAL_AXES_ORIENTATION_ZUP'
assert msao.local_axes_orientation == 'E_LOCAL_AXES_ORIENTATION_ZUP'
assert msao.tolerance_for_nodes == 0.001
assert msao.tolerance_for_lines == 0.002
assert msao.tolerance_for_surfaces_and_planes == 0.003
assert msao.tolerance_for_directions == 0.004