forked from dlubal-software/RFEM_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_aluminumEffectiveLengths.py
42 lines (30 loc) · 1.67 KB
/
test_aluminumEffectiveLengths.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
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.TypesForAluminumDesign.aluminumEffectiveLengths import AluminumEffectiveLengths
if Model.clientModel is None:
Model()
def test_aluminumEffectiveLengths():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
SetAddonStatus(Model.clientModel, AddOn.aluminum_design_active)
AluminumEffectiveLengths(1, "", "", True, False, False, False, True, False, 'SEL1')
AluminumEffectiveLengths(2, "", "", False, False, False, True, True, False, 'SEL2',
True, True, determination_of_mcr=SteelEffectiveLengthsDeterminationMcrEurope.DETERMINATION_EUROPE_USER_DEFINED)
AluminumEffectiveLengths(3, "", "", True, False, False, False, True, True, 'SEL3')
Model.clientModel.service.finish_modification()
ef_1 = Model.clientModel.service.get_aluminum_effective_lengths(1)
assert ef_1.flexural_buckling_about_y == True
ef_2 = Model.clientModel.service.get_aluminum_effective_lengths(2)
assert ef_2.principal_section_axes == True
assert ef_2.nodal_supports[0][0].row['support_type'] == 'SUPPORT_TYPE_FIXED_IN_Z_Y_AND_TORSION'
assert ef_2.determination_mcr_europe == SteelEffectiveLengthsDeterminationMcrEurope.DETERMINATION_EUROPE_USER_DEFINED.name
ef_3 = Model.clientModel.service.get_aluminum_effective_lengths(3)
assert ef_3.factors[0][0].row['flexural_buckling_u'] == 1
assert ef_3.factors[0][0].row['flexural_buckling_y'] == 1