|
22 | 22 | d = float(input('Distance between frames in m: ')) |
23 | 23 | h = float(input('Height of frame in m: ')) |
24 | 24 |
|
25 | | - Model() |
| 25 | + Model(True, 'hall') |
26 | 26 | Model.clientModel.service.begin_modification() |
27 | 27 |
|
28 | 28 | # nodes |
|
65 | 65 |
|
66 | 66 | # vertical bracing |
67 | 67 | # add a question about repeating in every block, one yes one no, only beginning and end |
68 | | - |
| 68 | + BracingV_C1, BracingV_C2, BracingV_C3 = '', '', '' |
69 | 69 | BracingV = input('Would you like to include vertical bracing? (Y/N)') |
70 | 70 | if BracingV.lower() == 'yes' or BracingV.lower() == 'y': |
| 71 | + |
| 72 | + Material(3, 'EN AW-3004 H14') |
| 73 | + Section(3, 'IPE 80', 3) |
| 74 | + |
71 | 75 | BracingV_C1 = input( |
72 | 76 | 'Would you like to repeat a vertical bracing in every block? (Y/N)') |
73 | 77 | if BracingV_C1.lower() == 'yes' or BracingV_C1.lower() == 'y': |
74 | | - Material(3, 'EN AW-3004 H14') |
75 | | - Section(3, 'IPE 80', 3) |
| 78 | + |
76 | 79 | j = 4*n + 3*(n-1) |
77 | 80 | k = 4*n + 2*(n-1) |
78 | 81 | for i in range(n): |
79 | 82 | Member(k+1+4*i, i*5+1, i*5+7, 0.0, 3, 3) |
80 | 83 | Member(k+2+4*i, i*5+2, i*5+6, 0.0, 3, 3) |
81 | 84 | Member(k+3+4*i, i*5+5, i*5+9, 0.0, 3, 3) |
82 | 85 | Member(k+4+4*i, i*5+4, i*5+10, 0.0, 3, 3) |
| 86 | + else: |
| 87 | + BracingV_C2 = input( |
| 88 | + 'Would you like to repeat a vertical bracing only in the first and last block? (Y/N)') |
83 | 89 |
|
84 | | - BracingV_C2 = input( |
85 | | - 'Would you like to repeat a vertical bracing only in the first and last block? (Y/N)') |
86 | 90 | if BracingV_C2.lower() == 'yes' or BracingV_C2.lower() == 'y': |
87 | | - Material(3, 'EN AW-3004 H14') |
88 | | - Section(3, 'IPE 80', 3) |
89 | 91 |
|
90 | 92 | k = n*4+(n-1)*2 |
91 | 93 | for i in range(n): |
|
99 | 101 | Member.Tension(k+4+4*i, i*5+4, i*5+10, |
100 | 102 | MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_ANGLE, [0], 3) |
101 | 103 |
|
102 | | - # MAKE IT MORE GENERAL! |
103 | | - BracingV_C3 = input( |
104 | | - 'Would you like to repeat a vertical bracing in even/odd blocks? (Y/N)') |
| 104 | + elif BracingV_C2.lower() == 'no' or BracingV_C2.lower() == 'n': |
| 105 | + # MAKE IT MORE GENERAL! |
| 106 | + BracingV_C3 = input( |
| 107 | + 'Would you like to repeat a vertical bracing in even/odd blocks? (Y/N)') |
| 108 | + |
105 | 109 | if BracingV_C3.lower() == 'yes' or BracingV_C3.lower() == 'y': |
106 | | - Material(3, 'EN AW-3004 H14') |
107 | | - Section(3, 'IPE 80', 3) |
108 | 110 |
|
109 | 111 | j = 4*n + 3*(n-1) |
110 | 112 | k = 4*n + 2*(n-1) |
|
124 | 126 |
|
125 | 127 | member_count = n*4+(n-1)*2 |
126 | 128 | BracingH = input('Would you like to include horizontal bracing? (Y/N)') |
127 | | - if BracingV.lower() == 'yes' or BracingV.lower() == 'y': |
| 129 | + if BracingH.lower() == 'yes' or BracingH.lower() == 'y': |
| 130 | + |
| 131 | + Material(3, 'EN AW-3004 H14') |
| 132 | + Section(3, 'IPE 80', 3) |
| 133 | + |
128 | 134 | member_count += (n-1)*4 |
129 | | - BracingH = 'yes' |
130 | | - if BracingH.lower() == 'yes' or BracingH.lower() == 'y': |
131 | | - |
132 | | - for i in range(n-1): |
133 | | - j = i * 5 |
134 | | - Member(int(member_count+1+4*i), j+2, j+8, 0.0, 3, 3) |
135 | | - Member(int(member_count+2+4*i), j+3, j+7, 0.0, 3, 3) |
136 | | - Member(int(member_count+3+4*i), j+3, j+9, 0.0, 3, 3) |
137 | | - Member(int(member_count+4+4*i), j+4, j+8, 0.0, 3, 3) |
| 135 | + for i in range(n-1): |
| 136 | + j = i * 5 |
| 137 | + Member(int(member_count+1+4*i), j+2, j+8, 0.0, 3, 3) |
| 138 | + Member(int(member_count+2+4*i), j+3, j+7, 0.0, 3, 3) |
| 139 | + Member(int(member_count+3+4*i), j+3, j+9, 0.0, 3, 3) |
| 140 | + Member(int(member_count+4+4*i), j+4, j+8, 0.0, 3, 3) |
138 | 141 |
|
139 | 142 | print("Preparing...") |
140 | 143 | print('Ready!') |
|
0 commit comments