forked from dlubal-software/RFEM_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_steelBoundaryConditions.py
53 lines (38 loc) · 2.49 KB
/
test_steelBoundaryConditions.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 *
from RFEM.initModel import Model, SetAddonStatus
from RFEM.TypesForSteelDesign.steelBoundaryConditions import *
if Model.clientModel is None:
Model()
def test_steelEffectiveLengths():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
SetAddonStatus(Model.clientModel, AddOn.steel_design_active, True)
SteelBoundaryConditions(1, "BCTEST_1", '1', '', True, True, True)
SteelBoundaryConditions(2, "BCTEST_2", '', '', True, True, True,
nodal_supports= [
[None, SteelBoundaryConditionsSupportType.SUPPORT_TYPE_FIXED_IN_Y_AND_TORSION, False, True, False, True, False, False, False,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SteelBoundaryConditionsEccentricityTypeZ.ECCENTRICITY_TYPE_USER_VALUE, 0.0, 0.0, 0.0, ""],
[None, SteelBoundaryConditionsSupportType.SUPPORT_TYPE_FIXED_IN_Y_AND_TORSION, False, True, False, True, False, False, False,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SteelBoundaryConditionsEccentricityTypeZ.ECCENTRICITY_TYPE_USER_VALUE, 0.0, 0.0, 0.0, ""],
[None, SteelBoundaryConditionsSupportType.SUPPORT_TYPE_FIXED_IN_Y_AND_TORSION, False, True, False, True, False, False, False,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SteelBoundaryConditionsEccentricityTypeZ.ECCENTRICITY_TYPE_USER_VALUE, 0.0, 0.0, 0.0, ""]
],
member_hinges=[
["Start", False, False, False, False, False, False, False, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ""],
["Inter.", False, False, False, False, False, False, False, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ""],
["End", True, False, False, True, False, False, True, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ""]
]
)
bc_1 = Model.clientModel.service.get_steel_boundary_conditions(1)
assert bc_1.no == 1
assert bc_1.nodal_supports[0][0].row['rotation'] == 0
bc_2 = Model.clientModel.service.get_steel_boundary_conditions(2)
assert bc_2.member_hinges[0][1].row['node_seq_no'] == "Inter."
Model.clientModel.service.finish_modification()