midas-civil 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of midas-civil might be problematic. Click here for more details.
- midas_civil/__init__.py +5 -0
- midas_civil/_boundary.py +11 -1
- midas_civil/_element.py +186 -7
- midas_civil/_group.py +23 -2
- midas_civil/_load.py +49 -23
- midas_civil/_mapi.py +18 -5
- midas_civil/_model.py +6 -0
- midas_civil/_movingload.py +1431 -0
- midas_civil/_node.py +20 -5
- midas_civil/_result.py +3 -3
- midas_civil/_result_extract.py +17 -9
- midas_civil/_section.py +137 -3
- midas_civil/_settlement.py +160 -0
- midas_civil/_temperature.py +262 -1
- midas_civil/_tendon.py +839 -56
- midas_civil/_thickness.py +1 -1
- midas_civil/_view.py +5 -0
- {midas_civil-0.1.4.dist-info → midas_civil-0.1.6.dist-info}/METADATA +1 -1
- midas_civil-0.1.6.dist-info/RECORD +27 -0
- midas_civil-0.1.4.dist-info/RECORD +0 -25
- {midas_civil-0.1.4.dist-info → midas_civil-0.1.6.dist-info}/WHEEL +0 -0
- {midas_civil-0.1.4.dist-info → midas_civil-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {midas_civil-0.1.4.dist-info → midas_civil-0.1.6.dist-info}/top_level.txt +0 -0
midas_civil/_tendon.py
CHANGED
|
@@ -1,11 +1,552 @@
|
|
|
1
1
|
|
|
2
2
|
from ._mapi import *
|
|
3
3
|
from ._utils import *
|
|
4
|
+
from ._load import *
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _JStoObj_Relax(js):
|
|
8
|
+
rm = js['RM']
|
|
9
|
+
rv = js['RV']
|
|
10
|
+
us = js['US']
|
|
11
|
+
ys = js['YS']
|
|
12
|
+
bRelax = js['bRELAX']
|
|
13
|
+
cff = js['FF']
|
|
14
|
+
|
|
15
|
+
if rm == 9: # CEBFIP 2010 Code
|
|
16
|
+
wtype = js['W_TYPE']
|
|
17
|
+
if wtype:
|
|
18
|
+
return Tendon.Relaxation.CEBFIP_2010(rv,js['TDMFK'],us,ys,cff,0,js['W_ANGLE'])
|
|
19
|
+
else:
|
|
20
|
+
return Tendon.Relaxation.CEBFIP_2010(rv,js['TDMFK'],us,ys,cff,js['WF'],0)
|
|
21
|
+
|
|
22
|
+
elif rm == 8: # CEBFIP 1990 Code
|
|
23
|
+
wtype = js['W_TYPE']
|
|
24
|
+
if wtype:
|
|
25
|
+
return Tendon.Relaxation.CEBFIP_1990(rv,us,ys,cff,0,js['W_ANGLE'])
|
|
26
|
+
else:
|
|
27
|
+
return Tendon.Relaxation.CEBFIP_1990(rv,us,ys,cff,js['WF'],0)
|
|
28
|
+
|
|
29
|
+
elif rm == 1: # CEBFIP 2010 Code
|
|
30
|
+
wtype = js['W_TYPE']
|
|
31
|
+
if wtype:
|
|
32
|
+
return Tendon.Relaxation.CEBFIP_1978(rv,us,ys,cff,0,js['W_ANGLE'])
|
|
33
|
+
else:
|
|
34
|
+
return Tendon.Relaxation.CEBFIP_1978(rv,us,ys,cff,js['WF'],0)
|
|
35
|
+
|
|
36
|
+
elif rm == 5: # European
|
|
37
|
+
wtype = js['W_TYPE']
|
|
38
|
+
if wtype:
|
|
39
|
+
return Tendon.Relaxation.European(rv,us,ys,cff,0,js['W_ANGLE'])
|
|
40
|
+
else:
|
|
41
|
+
return Tendon.Relaxation.European(rv,us,ys,cff,js['WF'],0)
|
|
42
|
+
|
|
43
|
+
elif rm == 4:
|
|
44
|
+
return Tendon.Relaxation.IRC_18(rv,us,ys,cff,js['WF'])
|
|
45
|
+
|
|
46
|
+
elif rm == 7:
|
|
47
|
+
return Tendon.Relaxation.IRC_112(rv,us,ys,cff,js['WF'])
|
|
48
|
+
|
|
49
|
+
elif rm == 0:
|
|
50
|
+
if bRelax:
|
|
51
|
+
return Tendon.Relaxation.Magura(rv,us,ys,cff,js['WF'])
|
|
52
|
+
else: return Tendon.Relaxation.Null(us,ys,cff,js['WF'])
|
|
53
|
+
|
|
54
|
+
else : # If nothing is matched No relaxation is applied
|
|
55
|
+
return Tendon.Relaxation.Null(us,ys,cff,js['WF'])
|
|
56
|
+
|
|
57
|
+
def _JStoObj_Prop(id, js):
|
|
58
|
+
name = js['NAME']
|
|
59
|
+
|
|
60
|
+
if js['TYPE'] == 'INTERNAL' :
|
|
61
|
+
if js['LT'] == 'POST': type = 2
|
|
62
|
+
else : type = 1
|
|
63
|
+
else: type = 3
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
matID = js['MATL']
|
|
67
|
+
tdn_area = js['AREA']
|
|
68
|
+
duct_dia = js['D_AREA']
|
|
69
|
+
relax = _JStoObj_Relax(js)
|
|
70
|
+
ext_mo = js['ALPHA']
|
|
71
|
+
an_s_b = js['ASB']
|
|
72
|
+
an_s_e = js['ASE']
|
|
73
|
+
bond_type = js['bBONDED']
|
|
74
|
+
|
|
75
|
+
Tendon.Property(name,type,matID,tdn_area,duct_dia,relax,ext_mo,an_s_b,an_s_e,bond_type,id)
|
|
76
|
+
|
|
77
|
+
def _JStoObj_Profile(id,js):
|
|
78
|
+
tdn_id = id
|
|
79
|
+
name = js['NAME']
|
|
80
|
+
tdnProperty = js['TDN_PROP']
|
|
81
|
+
tdn_group = js['TDN_GRUP']
|
|
82
|
+
elem = js['ELEM']
|
|
83
|
+
|
|
84
|
+
inp_type = js['INPUT'] #3D
|
|
85
|
+
curve_type = js['CURVE'] #SPLINE
|
|
86
|
+
ref_axis = js['SHAPE'] #ELEMENT
|
|
87
|
+
|
|
88
|
+
# Common
|
|
89
|
+
st_len_begin = js['BELENG']
|
|
90
|
+
st_len_end = js['ELENG']
|
|
91
|
+
|
|
92
|
+
b_typical_tendon = js['bTP']
|
|
93
|
+
n_typical_tendon = 0
|
|
94
|
+
if b_typical_tendon:
|
|
95
|
+
n_typical_tendon = js['CNT']
|
|
96
|
+
|
|
97
|
+
trans_len_opt = js['LENG_OPT']
|
|
98
|
+
trans_len_begin = js['BLEN']
|
|
99
|
+
trans_len_end = js['ELEN']
|
|
100
|
+
|
|
101
|
+
debon_len_begin = js['DeBondBLEN']
|
|
102
|
+
debon_len_end = js['DeBondELEN']
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
#Variable initialise to remove errors
|
|
106
|
+
prof_xyz = []
|
|
107
|
+
prof_xy = []
|
|
108
|
+
prof_xz = []
|
|
109
|
+
prof_ins_point_end = 'END-I'
|
|
110
|
+
prof_ins_point_elem = 0
|
|
111
|
+
x_axis_dir_element = 'I-J'
|
|
112
|
+
x_axis_rot_ang = 0
|
|
113
|
+
projection = True
|
|
114
|
+
offset_y = 0
|
|
115
|
+
offset_z = 0
|
|
116
|
+
prof_ins_point = [0, 0, 0]
|
|
117
|
+
x_axis_dir_straight = 'X'
|
|
118
|
+
x_axis_dir_vec = [0, 0]
|
|
119
|
+
grad_rot_axis = 'X'
|
|
120
|
+
grad_rot_ang = 0
|
|
121
|
+
radius_cen = [0, 0]
|
|
122
|
+
offset = 0
|
|
123
|
+
dir = 'CW'
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
#3D - SPLINE - ROUND is bFIX , R is not considered
|
|
127
|
+
if inp_type == '3D' :
|
|
128
|
+
prof_xyz = []
|
|
129
|
+
json_profile_arr = js['PROF']
|
|
130
|
+
|
|
131
|
+
for i in range(len(json_profile_arr)):
|
|
132
|
+
prof_xyz.append([json_profile_arr[i]['PT'][0],json_profile_arr[i]['PT'][1],json_profile_arr[i]['PT'][2]])
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
#2D
|
|
137
|
+
elif inp_type == '2D' :
|
|
138
|
+
prof_xy = []
|
|
139
|
+
prof_xz = []
|
|
140
|
+
json_profileY_arr = js['PROFY']
|
|
141
|
+
json_profileZ_arr = js['PROFZ']
|
|
142
|
+
|
|
143
|
+
for i in range(len(json_profileY_arr)):
|
|
144
|
+
prof_xy.append([json_profileY_arr[i]['PT'][0],json_profileY_arr[i]['PT'][1]])
|
|
145
|
+
|
|
146
|
+
for i in range(len(json_profileZ_arr)):
|
|
147
|
+
prof_xz.append([json_profileZ_arr[i]['PT'][0],json_profileZ_arr[i]['PT'][1]])
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
# ELEMENT
|
|
151
|
+
if ref_axis == 'ELEMENT' :
|
|
152
|
+
|
|
153
|
+
prof_ins_point_end = js['INS_PT']
|
|
154
|
+
prof_ins_point_elem = js['INS_ELEM']
|
|
155
|
+
x_axis_dir_element = js['AXIS_IJ']
|
|
156
|
+
x_axis_rot_ang =js['XAR_ANGLE']
|
|
157
|
+
projection = js['bPJ']
|
|
158
|
+
offset_y = js['OFF_YZ'][0]
|
|
159
|
+
offset_z = js['OFF_YZ'][1]
|
|
160
|
+
|
|
161
|
+
elif ref_axis == 'STRAIGHT' :
|
|
162
|
+
prof_ins_point = js['IP']
|
|
163
|
+
x_axis_dir_straight = js['AXIS']
|
|
164
|
+
x_axis_dir_vec = js['VEC']
|
|
165
|
+
x_axis_rot_ang =js['XAR_ANGLE']
|
|
166
|
+
projection = js['bPJ']
|
|
167
|
+
grad_rot_axis = js['GR_AXIS']
|
|
168
|
+
grad_rot_ang = js['GR_ANGLE']
|
|
169
|
+
|
|
170
|
+
elif ref_axis == 'CURVE' :
|
|
171
|
+
prof_ins_point = js['IP']
|
|
172
|
+
radius_cen = js['RC']
|
|
173
|
+
offset = js['OFFSET']
|
|
174
|
+
dir = js['DIR']
|
|
175
|
+
x_axis_rot_ang =js['XAR_ANGLE']
|
|
176
|
+
projection = js['bPJ']
|
|
177
|
+
grad_rot_axis = js['GR_AXIS']
|
|
178
|
+
grad_rot_ang = js['GR_ANGLE']
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
Tendon.Profile(name,tdnProperty,tdn_group,elem,inp_type,curve_type,st_len_begin,st_len_end,n_typical_tendon,
|
|
182
|
+
trans_len_opt,trans_len_begin,trans_len_end,debon_len_begin,debon_len_end,ref_axis,
|
|
183
|
+
prof_xyz,prof_xy,prof_xz,prof_ins_point,prof_ins_point_elem,x_axis_dir_element,x_axis_rot_ang,
|
|
184
|
+
projection,offset_y,offset_z,prof_ins_point,x_axis_dir_straight,x_axis_dir_vec,grad_rot_axis,grad_rot_ang,radius_cen,offset,dir,tdn_id)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class _POINT_ : # Local class to store points
|
|
189
|
+
def __init__(self,x,y,z):
|
|
190
|
+
self.X = x
|
|
191
|
+
self.Y = y
|
|
192
|
+
self.Z = z
|
|
4
193
|
|
|
5
194
|
|
|
6
195
|
#5 Class to create nodes
|
|
7
196
|
class Tendon:
|
|
8
197
|
|
|
198
|
+
@staticmethod
|
|
199
|
+
def create():
|
|
200
|
+
if Tendon.Property.properties!=[]:
|
|
201
|
+
Tendon.Property.create()
|
|
202
|
+
if Tendon.Profile.profiles !=[]:
|
|
203
|
+
Tendon.Profile.create()
|
|
204
|
+
if Tendon.Prestress.load !=[]:
|
|
205
|
+
Tendon.Prestress.create()
|
|
206
|
+
|
|
207
|
+
class Relaxation:
|
|
208
|
+
|
|
209
|
+
class CEBFIP_2010:
|
|
210
|
+
|
|
211
|
+
def __init__(self,rho,rel_class,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0,unint_ang_disp=0):
|
|
212
|
+
'''
|
|
213
|
+
rel_class = 1 Slow | 2 Mean | 3 Rapid
|
|
214
|
+
'''
|
|
215
|
+
self.CODE = 'CEB FIP-2010'
|
|
216
|
+
self.RHO = rho
|
|
217
|
+
self.CLASS = rel_class
|
|
218
|
+
|
|
219
|
+
self.ULT_ST = ult_st
|
|
220
|
+
self.YIELD_ST = yield_st
|
|
221
|
+
self.CURV_FF = curv_fric_fac
|
|
222
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
223
|
+
|
|
224
|
+
self.UNINT_AD = unint_ang_disp
|
|
225
|
+
|
|
226
|
+
def json(self):
|
|
227
|
+
bs_json ={
|
|
228
|
+
"RM" : 9,
|
|
229
|
+
"RV" : self.RHO,
|
|
230
|
+
"TDMFK" : self.CLASS,
|
|
231
|
+
"US" : self.ULT_ST,
|
|
232
|
+
"YS" : self.YIELD_ST,
|
|
233
|
+
"FF" : self.CURV_FF,
|
|
234
|
+
"WF" : self.WOBBLE_FF,
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if self.UNINT_AD != 0:
|
|
238
|
+
bs_json.update({"W_TYPE" : 1 , "W_ANGLE" : self.UNINT_AD})
|
|
239
|
+
|
|
240
|
+
return bs_json
|
|
241
|
+
|
|
242
|
+
def __str__(self):
|
|
243
|
+
return str(self.__dict__)
|
|
244
|
+
|
|
245
|
+
class CEBFIP_1978:
|
|
246
|
+
|
|
247
|
+
def __init__(self,rho,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0,unint_ang_disp=0):
|
|
248
|
+
'''
|
|
249
|
+
rel_class = 1 Slow | 2 Mean | 3 Rapid
|
|
250
|
+
'''
|
|
251
|
+
self.CODE = 'CEB FIP-1978'
|
|
252
|
+
self.RHO = rho
|
|
253
|
+
|
|
254
|
+
self.ULT_ST = ult_st
|
|
255
|
+
self.YIELD_ST = yield_st
|
|
256
|
+
self.CURV_FF = curv_fric_fac
|
|
257
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
258
|
+
|
|
259
|
+
self.UNINT_AD = unint_ang_disp
|
|
260
|
+
|
|
261
|
+
def json(self):
|
|
262
|
+
bs_json ={
|
|
263
|
+
"RM" : 1,
|
|
264
|
+
"RV" : self.RHO,
|
|
265
|
+
"US" : self.ULT_ST,
|
|
266
|
+
"YS" : self.YIELD_ST,
|
|
267
|
+
"FF" : self.CURV_FF,
|
|
268
|
+
"WF" : self.WOBBLE_FF,
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if self.UNINT_AD != 0:
|
|
272
|
+
bs_json.update({"W_TYPE" : 1 , "W_ANGLE" : self.UNINT_AD})
|
|
273
|
+
|
|
274
|
+
return bs_json
|
|
275
|
+
|
|
276
|
+
def __str__(self):
|
|
277
|
+
return str(self.__dict__)
|
|
278
|
+
|
|
279
|
+
class CEBFIP_1990:
|
|
280
|
+
|
|
281
|
+
def __init__(self,rho,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0,unint_ang_disp=0):
|
|
282
|
+
'''
|
|
283
|
+
rel_class = 1 Slow | 2 Mean | 3 Rapid
|
|
284
|
+
'''
|
|
285
|
+
self.CODE = 'CEB FIP-1990'
|
|
286
|
+
self.RHO = rho
|
|
287
|
+
|
|
288
|
+
self.ULT_ST = ult_st
|
|
289
|
+
self.YIELD_ST = yield_st
|
|
290
|
+
self.CURV_FF = curv_fric_fac
|
|
291
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
292
|
+
|
|
293
|
+
self.UNINT_AD = unint_ang_disp
|
|
294
|
+
|
|
295
|
+
def json(self):
|
|
296
|
+
bs_json ={
|
|
297
|
+
"RM" : 8,
|
|
298
|
+
"RV" : self.RHO,
|
|
299
|
+
"US" : self.ULT_ST,
|
|
300
|
+
"YS" : self.YIELD_ST,
|
|
301
|
+
"FF" : self.CURV_FF,
|
|
302
|
+
"WF" : self.WOBBLE_FF,
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if self.UNINT_AD != 0:
|
|
306
|
+
bs_json.update({"W_TYPE" : 1 , "W_ANGLE" : self.UNINT_AD})
|
|
307
|
+
|
|
308
|
+
return bs_json
|
|
309
|
+
|
|
310
|
+
def __str__(self):
|
|
311
|
+
return str(self.__dict__)
|
|
312
|
+
|
|
313
|
+
class European:
|
|
314
|
+
|
|
315
|
+
def __init__(self,rel_class,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0,unint_ang_disp=0):
|
|
316
|
+
'''
|
|
317
|
+
rel_class = 1 Ordinary | 2 Low | 3 HotRolled
|
|
318
|
+
'''
|
|
319
|
+
self.CODE = 'European'
|
|
320
|
+
self.CLASS = rel_class
|
|
321
|
+
|
|
322
|
+
self.ULT_ST = ult_st
|
|
323
|
+
self.YIELD_ST = yield_st
|
|
324
|
+
self.CURV_FF = curv_fric_fac
|
|
325
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
326
|
+
|
|
327
|
+
self.UNINT_AD = unint_ang_disp
|
|
328
|
+
|
|
329
|
+
def json(self):
|
|
330
|
+
bs_json ={
|
|
331
|
+
"RM" : 5,
|
|
332
|
+
"RV" : self.CLASS,
|
|
333
|
+
"US" : self.ULT_ST,
|
|
334
|
+
"YS" : self.YIELD_ST,
|
|
335
|
+
"FF" : self.CURV_FF,
|
|
336
|
+
"WF" : self.WOBBLE_FF,
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if self.UNINT_AD != 0:
|
|
340
|
+
bs_json.update({"W_TYPE" : 1 , "W_ANGLE" : self.UNINT_AD})
|
|
341
|
+
|
|
342
|
+
return bs_json
|
|
343
|
+
|
|
344
|
+
def __str__(self):
|
|
345
|
+
return str(self.__dict__)
|
|
346
|
+
|
|
347
|
+
class IRC_18:
|
|
348
|
+
|
|
349
|
+
def __init__(self,factor,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0):
|
|
350
|
+
|
|
351
|
+
self.CODE = 'IRC:18-2000'
|
|
352
|
+
|
|
353
|
+
self.FACTOR = factor
|
|
354
|
+
|
|
355
|
+
self.ULT_ST = ult_st
|
|
356
|
+
self.YIELD_ST = yield_st
|
|
357
|
+
self.CURV_FF = curv_fric_fac
|
|
358
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
359
|
+
|
|
360
|
+
def json(self):
|
|
361
|
+
bs_json ={
|
|
362
|
+
"RM" : 4,
|
|
363
|
+
"RV" : self.FACTOR,
|
|
364
|
+
"US" : self.ULT_ST,
|
|
365
|
+
"YS" : self.YIELD_ST,
|
|
366
|
+
"FF" : self.CURV_FF,
|
|
367
|
+
"WF" : self.WOBBLE_FF
|
|
368
|
+
}
|
|
369
|
+
return bs_json
|
|
370
|
+
|
|
371
|
+
def __str__(self):
|
|
372
|
+
return str(self.__dict__)
|
|
373
|
+
|
|
374
|
+
class IRC_112:
|
|
375
|
+
|
|
376
|
+
def __init__(self,factor,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0):
|
|
377
|
+
|
|
378
|
+
self.CODE = 'IRC:112-2011'
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
self.FACTOR = factor
|
|
382
|
+
|
|
383
|
+
self.ULT_ST = ult_st
|
|
384
|
+
self.YIELD_ST = yield_st
|
|
385
|
+
self.CURV_FF = curv_fric_fac
|
|
386
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
387
|
+
|
|
388
|
+
def json(self):
|
|
389
|
+
bs_json ={
|
|
390
|
+
"RM" : 7,
|
|
391
|
+
"RV" : self.FACTOR,
|
|
392
|
+
"US" : self.ULT_ST,
|
|
393
|
+
"YS" : self.YIELD_ST,
|
|
394
|
+
"FF" : self.CURV_FF,
|
|
395
|
+
"WF" : self.WOBBLE_FF
|
|
396
|
+
}
|
|
397
|
+
return bs_json
|
|
398
|
+
|
|
399
|
+
def __str__(self):
|
|
400
|
+
return str(self.__dict__)
|
|
401
|
+
|
|
402
|
+
class Null:
|
|
403
|
+
|
|
404
|
+
def __init__(self,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0):
|
|
405
|
+
|
|
406
|
+
self.CODE = 'No Relaxation'
|
|
407
|
+
|
|
408
|
+
self.ULT_ST = ult_st
|
|
409
|
+
self.YIELD_ST = yield_st
|
|
410
|
+
self.CURV_FF = curv_fric_fac
|
|
411
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
412
|
+
|
|
413
|
+
def json(self):
|
|
414
|
+
bs_json ={
|
|
415
|
+
"RM" : 0,
|
|
416
|
+
"RV" : 0,
|
|
417
|
+
"US" : self.ULT_ST,
|
|
418
|
+
"YS" : self.YIELD_ST,
|
|
419
|
+
"FF" : self.CURV_FF,
|
|
420
|
+
"WF" : self.WOBBLE_FF,
|
|
421
|
+
"bRELAX" : False
|
|
422
|
+
}
|
|
423
|
+
return bs_json
|
|
424
|
+
|
|
425
|
+
def __str__(self):
|
|
426
|
+
return str(self.__dict__)
|
|
427
|
+
|
|
428
|
+
class Magura:
|
|
429
|
+
|
|
430
|
+
def __init__(self,factor,ult_st,yield_st,curv_fric_fac=0,wob_fric_fac=0):
|
|
431
|
+
|
|
432
|
+
self.CODE = 'Magura'
|
|
433
|
+
|
|
434
|
+
if factor not in [10,45]:
|
|
435
|
+
factor = 45
|
|
436
|
+
|
|
437
|
+
self.FACTOR = factor
|
|
438
|
+
|
|
439
|
+
self.ULT_ST = ult_st
|
|
440
|
+
self.YIELD_ST = yield_st
|
|
441
|
+
self.CURV_FF = curv_fric_fac
|
|
442
|
+
self.WOBBLE_FF = wob_fric_fac
|
|
443
|
+
|
|
444
|
+
def json(self):
|
|
445
|
+
bs_json ={
|
|
446
|
+
"RM" : 0,
|
|
447
|
+
"RV" : self.FACTOR,
|
|
448
|
+
"US" : self.ULT_ST,
|
|
449
|
+
"YS" : self.YIELD_ST,
|
|
450
|
+
"FF" : self.CURV_FF,
|
|
451
|
+
"WF" : self.WOBBLE_FF
|
|
452
|
+
}
|
|
453
|
+
return bs_json
|
|
454
|
+
|
|
455
|
+
def __str__(self):
|
|
456
|
+
return str(self.__dict__)
|
|
457
|
+
|
|
458
|
+
# ----------------- TENDON PROPERTY --------------------------
|
|
459
|
+
class Property:
|
|
460
|
+
properties =[]
|
|
461
|
+
ids = []
|
|
462
|
+
|
|
463
|
+
def __init__(self,name,type,matID:int,tdn_area,duct_dia,relaxation,ext_mom_mag=0,anch_slip_begin=0,anch_slip_end=0,bond_type:bool=True,id=0):
|
|
464
|
+
|
|
465
|
+
'''
|
|
466
|
+
type = ['Internal (Pre-tension)' , 'Internal (Post-tenstion)' , 'External'] => 1,2,3
|
|
467
|
+
'''
|
|
468
|
+
if Tendon.Property.ids == []:
|
|
469
|
+
tp_count = 1
|
|
470
|
+
else:
|
|
471
|
+
tp_count = max(Tendon.Property.ids)+1
|
|
472
|
+
|
|
473
|
+
if id == 0 : self.ID = tp_count
|
|
474
|
+
if id != 0 : self.ID = id
|
|
475
|
+
|
|
476
|
+
self.NAME = name
|
|
477
|
+
|
|
478
|
+
if type == 2:
|
|
479
|
+
self.TYPE = 'INTERNAL'
|
|
480
|
+
self.TENS = 'POST'
|
|
481
|
+
elif type == 3:
|
|
482
|
+
self.TYPE = 'EXTERNAL'
|
|
483
|
+
self.TENS = 'PRE'
|
|
484
|
+
else :
|
|
485
|
+
self.TYPE = 'INTERNAL'
|
|
486
|
+
self.TENS = 'PRE'
|
|
487
|
+
|
|
488
|
+
self.MAT = matID
|
|
489
|
+
self.TDN_AREA = tdn_area
|
|
490
|
+
self.DUCT_DIA = duct_dia
|
|
491
|
+
|
|
492
|
+
self.RELAX = relaxation
|
|
493
|
+
|
|
494
|
+
self.EXT_MOM_MAG = ext_mom_mag
|
|
495
|
+
self.ANC_SLIP_B = anch_slip_begin
|
|
496
|
+
self.ANC_SLIP_E = anch_slip_end
|
|
497
|
+
self.BOND_TYPE = bond_type
|
|
498
|
+
|
|
499
|
+
Tendon.Property.properties.append(self)
|
|
500
|
+
Tendon.Property.ids.append(self.ID)
|
|
501
|
+
|
|
502
|
+
@classmethod
|
|
503
|
+
def json(cls):
|
|
504
|
+
json = {"Assign":{}}
|
|
505
|
+
|
|
506
|
+
for self in cls.properties:
|
|
507
|
+
json['Assign'][self.ID]={
|
|
508
|
+
"NAME" : self.NAME,
|
|
509
|
+
"TYPE" : self.TYPE,
|
|
510
|
+
"LT" : self.TENS,
|
|
511
|
+
"MATL" : self.MAT,
|
|
512
|
+
"AREA" : self.TDN_AREA,
|
|
513
|
+
"D_AREA" : self.DUCT_DIA,
|
|
514
|
+
"ASB" : self.ANC_SLIP_B,
|
|
515
|
+
"ASE" : self.ANC_SLIP_E,
|
|
516
|
+
"bBONDED" : self.BOND_TYPE,
|
|
517
|
+
"ALPHA" : self.EXT_MOM_MAG
|
|
518
|
+
}
|
|
519
|
+
json['Assign'][self.ID].update(self.RELAX.json())
|
|
520
|
+
|
|
521
|
+
return json
|
|
522
|
+
|
|
523
|
+
@classmethod
|
|
524
|
+
def create(cls):
|
|
525
|
+
MidasAPI("PUT","/db/TDNT",cls.json())
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
@classmethod
|
|
529
|
+
def get(cls):
|
|
530
|
+
return MidasAPI('GET','/db/TDNT')
|
|
531
|
+
|
|
532
|
+
@classmethod
|
|
533
|
+
def delete(cls):
|
|
534
|
+
MidasAPI("DELETE","/db/TDNT")
|
|
535
|
+
cls.properties = []
|
|
536
|
+
cls.ids = []
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
@classmethod
|
|
540
|
+
def sync(cls):
|
|
541
|
+
a = cls.get()
|
|
542
|
+
if a != {'message': ''}:
|
|
543
|
+
if list(a['TDNT'].keys()) != []:
|
|
544
|
+
cls.properties = []
|
|
545
|
+
cls.ids=[]
|
|
546
|
+
for id in a['TDNT'].keys():
|
|
547
|
+
_JStoObj_Prop(int(id),a['TDNT'][id])
|
|
548
|
+
|
|
549
|
+
|
|
9
550
|
# ----------------- TENDON PROFILE --------------------------
|
|
10
551
|
class Profile:
|
|
11
552
|
profiles =[]
|
|
@@ -19,6 +560,9 @@ class Tendon:
|
|
|
19
560
|
prof_ins_point =[0,0,0], x_axis_dir_straight = 'X' , x_axis_dir_vec = [0,0], grad_rot_axis = 'X', grad_rot_ang=0,
|
|
20
561
|
radius_cen = [0,0], offset = 0, dir = 'CW',
|
|
21
562
|
id=0):
|
|
563
|
+
'''
|
|
564
|
+
TDN GROUP = Group ID
|
|
565
|
+
'''
|
|
22
566
|
|
|
23
567
|
|
|
24
568
|
|
|
@@ -28,7 +572,7 @@ class Tendon:
|
|
|
28
572
|
td_count = max(Tendon.Profile.ids)+1
|
|
29
573
|
|
|
30
574
|
if id == 0 : self.ID = td_count
|
|
31
|
-
|
|
575
|
+
else : self.ID = id
|
|
32
576
|
|
|
33
577
|
self.NAME = name
|
|
34
578
|
self.PROP = tdn_prop
|
|
@@ -103,44 +647,82 @@ class Tendon:
|
|
|
103
647
|
|
|
104
648
|
|
|
105
649
|
#--------------- PROFILES CREATION -----------------
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
650
|
+
|
|
651
|
+
#----- 3D Profile (Round + Spline) -------------
|
|
652
|
+
xyz_loc = []
|
|
109
653
|
bFix = []
|
|
110
|
-
|
|
111
|
-
|
|
654
|
+
R_spline3d = []
|
|
655
|
+
R_round3d = []
|
|
112
656
|
|
|
113
657
|
for point in prof_xyz:
|
|
114
|
-
|
|
115
|
-
y_loc.append(point[1])
|
|
116
|
-
z_loc.append(point[2])
|
|
658
|
+
xyz_loc.append(_POINT_(point[0],point[1],point[2]))
|
|
117
659
|
bFix.append(False) # Default not defining here
|
|
118
660
|
if curve_type == 'SPLINE':
|
|
119
|
-
|
|
661
|
+
R_spline3d.append([0,0]) # Default not defining here
|
|
120
662
|
else:
|
|
121
|
-
|
|
663
|
+
R_round3d.append(0)
|
|
122
664
|
|
|
123
|
-
|
|
665
|
+
self.P_XYZ = xyz_loc
|
|
124
666
|
|
|
125
|
-
self.X = x_loc
|
|
126
|
-
self.Y = y_loc
|
|
127
|
-
self.Z = z_loc
|
|
128
667
|
self.bFIX = bFix
|
|
668
|
+
self.R = R_spline3d
|
|
669
|
+
self.RADIUS = R_round3d
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
#----- 2D Profile Spline (only)-------------
|
|
674
|
+
xy_loc = []
|
|
675
|
+
xz_loc = []
|
|
676
|
+
|
|
677
|
+
bFix_y = []
|
|
678
|
+
bFix_z = []
|
|
679
|
+
|
|
680
|
+
R_spline2d_Rz = []
|
|
681
|
+
R_spline2d_Ry = []
|
|
129
682
|
|
|
130
|
-
|
|
131
|
-
|
|
683
|
+
for point in prof_xy:
|
|
684
|
+
xy_loc.append(_POINT_(point[0],point[1],0))
|
|
685
|
+
bFix_y.append(False) # Default not defining here
|
|
686
|
+
R_spline2d_Rz.append(0)
|
|
132
687
|
|
|
688
|
+
for point in prof_xz:
|
|
689
|
+
xz_loc.append(_POINT_(point[0],0,point[1]))
|
|
690
|
+
bFix_z.append(False) # Default not defining here
|
|
691
|
+
R_spline2d_Ry.append(0)
|
|
133
692
|
|
|
134
|
-
#----- 2D Profile -------------
|
|
135
693
|
|
|
694
|
+
self.P_XY = xy_loc
|
|
695
|
+
self.P_XZ = xz_loc
|
|
136
696
|
|
|
697
|
+
self.bFIX_XY = bFix_y
|
|
698
|
+
self.bFIX_XZ = bFix_z
|
|
137
699
|
|
|
700
|
+
self.R_XY = R_spline2d_Rz
|
|
701
|
+
self.R_XZ = R_spline2d_Ry
|
|
138
702
|
|
|
139
703
|
|
|
140
704
|
Tendon.Profile.profiles.append(self)
|
|
141
705
|
Tendon.Profile.ids.append(self.ID)
|
|
142
706
|
|
|
707
|
+
def update_profile(self,points_xyz):
|
|
708
|
+
xyz_loc = []
|
|
709
|
+
bFix = []
|
|
710
|
+
R_spline3d = []
|
|
711
|
+
R_round3d = []
|
|
712
|
+
|
|
713
|
+
for point in points_xyz:
|
|
714
|
+
xyz_loc.append(_POINT_(point[0],point[1],point[2]))
|
|
715
|
+
bFix.append(False) # Default not defining here
|
|
716
|
+
R_spline3d.append([0,0]) # Default not defining here
|
|
717
|
+
|
|
718
|
+
self.P_XYZ = xyz_loc
|
|
719
|
+
self.INPUT = '3D'
|
|
720
|
+
self.CURVE = 'SPLINE'
|
|
721
|
+
self.SHAPE = 'STRAIGHT'
|
|
143
722
|
|
|
723
|
+
self.bFIX = bFix
|
|
724
|
+
self.R = R_spline3d
|
|
725
|
+
self.RADIUS = R_round3d
|
|
144
726
|
|
|
145
727
|
@classmethod
|
|
146
728
|
def json(cls):
|
|
@@ -148,41 +730,124 @@ class Tendon:
|
|
|
148
730
|
json = {"Assign":{}}
|
|
149
731
|
|
|
150
732
|
for self in cls.profiles:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
733
|
+
json["Assign"][self.ID] = {
|
|
734
|
+
'NAME' : self.NAME,
|
|
735
|
+
'TDN_PROP' : self.PROP,
|
|
736
|
+
'ELEM' : self.ELEM,
|
|
737
|
+
'BELENG' : self.BELENG,
|
|
738
|
+
'ELENG' : self.ELENG,
|
|
739
|
+
'CURVE' : self.CURVE,
|
|
740
|
+
'INPUT' : self.INPUT,
|
|
741
|
+
'TDN_GRUP' : self.GROUP,
|
|
742
|
+
"LENG_OPT": self.LENG_OPT,
|
|
743
|
+
"BLEN": self.BLEN,
|
|
744
|
+
"ELEN": self.ELEN,
|
|
745
|
+
"bTP": self.bTP,
|
|
746
|
+
"CNT": self.CNT,
|
|
747
|
+
"DeBondBLEN": self.DeBondBLEN,
|
|
748
|
+
"DeBondELEN": self.DeBondELEN,
|
|
749
|
+
"SHAPE": self.SHAPE
|
|
750
|
+
}
|
|
751
|
+
# -------------------------------- 2D OR 3D (ROUND/SPLINE)--------------------------
|
|
752
|
+
if self.INPUT == '3D':
|
|
753
|
+
|
|
754
|
+
# -------- 3D ------------
|
|
755
|
+
array_temp = []
|
|
756
|
+
|
|
757
|
+
# -------- 3D SPLINE & ROUND ------------
|
|
758
|
+
if self.CURVE == 'ROUND' :
|
|
759
|
+
for j in range(len(self.P_XYZ)):
|
|
760
|
+
array_temp.append({
|
|
761
|
+
'PT' : [self.P_XYZ[j].X,self.P_XYZ[j].Y,self.P_XYZ[j].Z],
|
|
762
|
+
'bFIX' : self.bFIX[j],
|
|
763
|
+
'R' : self.RADIUS[j]
|
|
764
|
+
})
|
|
765
|
+
else:
|
|
766
|
+
for j in range(len(self.P_XYZ)):
|
|
767
|
+
array_temp.append({
|
|
768
|
+
'PT' : [self.P_XYZ[j].X,self.P_XYZ[j].Y,self.P_XYZ[j].Z],
|
|
769
|
+
'bFIX' : self.bFIX[j],
|
|
770
|
+
'R' : self.R[j]
|
|
771
|
+
})
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
# --- 3D Main ----
|
|
775
|
+
|
|
776
|
+
json_prof = {
|
|
777
|
+
"PROF":array_temp
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
elif self.INPUT == '2D':
|
|
781
|
+
|
|
782
|
+
# -------- 2D ------------
|
|
783
|
+
array_y_temp = []
|
|
784
|
+
array_z_temp = []
|
|
785
|
+
|
|
786
|
+
# -------- 2D ONLY SPLINE NOT ROUND ❌ ------------
|
|
787
|
+
|
|
788
|
+
for j in range(len(self.P_XY)):
|
|
789
|
+
array_y_temp.append({
|
|
790
|
+
'PT' : [self.P_XY[j].X,self.P_XY[j].Y],
|
|
791
|
+
'bFIX' : self.bFIX_XY[j],
|
|
792
|
+
'R' : self.R_XY[j]
|
|
793
|
+
})
|
|
794
|
+
|
|
795
|
+
for j in range(len(self.P_XZ)):
|
|
796
|
+
array_z_temp.append({
|
|
797
|
+
'PT' : [self.P_XZ[j].X,self.P_XZ[j].Z],
|
|
798
|
+
'bFIX' : self.bFIX_XZ[j],
|
|
799
|
+
'R' : self.R_XZ[j]
|
|
800
|
+
})
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
# --- 3D Main ----
|
|
804
|
+
|
|
805
|
+
json_prof = {
|
|
806
|
+
"PROFY":array_y_temp,
|
|
807
|
+
"PROFZ":array_z_temp
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
# ------------------------------------------- TYPE (ELEMNENT , STRAIGHT , CURVE) ------------------------------------
|
|
811
|
+
|
|
812
|
+
# ----- 3D Spline Element--------
|
|
813
|
+
if self.SHAPE == 'ELEMENT' :
|
|
814
|
+
json_shape={
|
|
815
|
+
"INS_PT": self.INS_PT,
|
|
816
|
+
"INS_ELEM": self.INS_ELEM,
|
|
817
|
+
"AXIS_IJ": self.AXIS_IJ,
|
|
818
|
+
"XAR_ANGLE": self.XAR_ANGLE,
|
|
819
|
+
"bPJ": self.bPJ,
|
|
820
|
+
"OFF_YZ": self.OFF_YZ,
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
# ----- 3D Spline Straight --------
|
|
824
|
+
elif self.SHAPE == 'STRAIGHT' :
|
|
825
|
+
json_shape={
|
|
826
|
+
"IP" : self.IP,
|
|
827
|
+
"AXIS" : self.AXIS,
|
|
828
|
+
"VEC" : self.VEC,
|
|
829
|
+
"XAR_ANGLE": self.XAR_ANGLE,
|
|
830
|
+
"bPJ": self.bPJ,
|
|
831
|
+
"GR_AXIS": self.GR_AXIS,
|
|
832
|
+
"GR_ANGLE": self.GR_ANGLE,
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
# ----- 3D Spline Curve --------
|
|
836
|
+
elif self.SHAPE == 'CURVE' :
|
|
837
|
+
json_shape={
|
|
838
|
+
"IP" : self.IP,
|
|
839
|
+
"RC" : self.RC,
|
|
840
|
+
"OFFSET" : self.OFFSET,
|
|
841
|
+
"DIR" : self.DIR,
|
|
842
|
+
"XAR_ANGLE": self.XAR_ANGLE,
|
|
843
|
+
"bPJ": self.bPJ,
|
|
844
|
+
"GR_AXIS": self.GR_AXIS,
|
|
845
|
+
"GR_ANGLE": self.GR_ANGLE,
|
|
846
|
+
}
|
|
159
847
|
|
|
160
|
-
json["Assign"][self.ID]
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
'ELEM' : self.ELEM,
|
|
164
|
-
'BELENG' : self.BELENG,
|
|
165
|
-
'ELENG' : self.ELENG,
|
|
166
|
-
'CURVE' : self.CURVE,
|
|
167
|
-
'INPUT' : self.INPUT,
|
|
168
|
-
'TDN_GRUP' : self.GROUP,
|
|
169
|
-
"LENG_OPT": self.LENG_OPT,
|
|
170
|
-
"BLEN": self.BLEN,
|
|
171
|
-
"ELEN": self.ELEN,
|
|
172
|
-
"bTP": self.bTP,
|
|
173
|
-
"CNT": self.CNT,
|
|
174
|
-
"DeBondBLEN": self.DeBondBLEN,
|
|
175
|
-
"DeBondELEN": self.DeBondELEN,
|
|
176
|
-
"SHAPE": self.SHAPE,
|
|
177
|
-
"INS_PT": self.INS_PT,
|
|
178
|
-
"INS_ELEM": self.INS_ELEM,
|
|
179
|
-
"AXIS_IJ": self.AXIS_IJ,
|
|
180
|
-
"XAR_ANGLE": self.XAR_ANGLE,
|
|
181
|
-
"bPJ": self.bPJ,
|
|
182
|
-
"OFF_YZ": self.OFF_YZ,
|
|
183
|
-
|
|
184
|
-
"PROF":array_temp
|
|
185
|
-
}
|
|
848
|
+
json["Assign"][self.ID].update(json_shape)
|
|
849
|
+
json["Assign"][self.ID].update(json_prof)
|
|
850
|
+
|
|
186
851
|
return json
|
|
187
852
|
|
|
188
853
|
|
|
@@ -197,8 +862,126 @@ class Tendon:
|
|
|
197
862
|
|
|
198
863
|
@classmethod
|
|
199
864
|
def sync(cls):
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
865
|
+
a = cls.get()
|
|
866
|
+
if a != {'message': ''}:
|
|
867
|
+
if list(a['TDNA'].keys()) != []:
|
|
868
|
+
cls.profiles = []
|
|
869
|
+
cls.ids=[]
|
|
870
|
+
for id in a['TDNA'].keys():
|
|
871
|
+
_JStoObj_Profile(int(id),a['TDNA'][id])
|
|
872
|
+
|
|
873
|
+
# --------------------- END CLASSS -----------------------------------------------------
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
class Prestress:
|
|
877
|
+
"""Creates node loads and converts to JSON format.
|
|
878
|
+
Example: Load_Node(101, "LC1", "Group1", FZ = 10)
|
|
879
|
+
"""
|
|
880
|
+
load = []
|
|
881
|
+
ids = []
|
|
882
|
+
def __init__(self, profile_name, load_case, load_group = "", prestress_type = "STRESS", jack_step = "BEGIN", jack_begin = 0, jack_end=0, grouting_stage = 0, id = 0):
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
if id > -1 :
|
|
886
|
+
chk = 0
|
|
887
|
+
for i in Load_Case.cases:
|
|
888
|
+
if load_case in i.NAME: chk = 1
|
|
889
|
+
if chk == 0: Load_Case("PS", load_case)
|
|
890
|
+
if load_group != "":
|
|
891
|
+
chk = 0
|
|
892
|
+
a = [v['NAME'] for v in Group.Load.json()["Assign"].values()]
|
|
893
|
+
if load_group in a: chk = 1
|
|
894
|
+
if chk == 0: Group.Load(load_group)
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
if prestress_type not in ['STRESS' , 'FORCE']: prestress_type = 'STRESS'
|
|
898
|
+
if jack_step not in ['BEGIN' , 'END' , 'BOTH']: jack_step = 'BEGIN'
|
|
899
|
+
|
|
900
|
+
self.TDN_ID = 0
|
|
901
|
+
if id == 0: id = len(Tendon.Prestress.load) + 1
|
|
902
|
+
self.ID = id
|
|
903
|
+
else:
|
|
904
|
+
self.TDN_ID = -id//100000
|
|
905
|
+
self.ID = -id%100000
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
self.TDN_NAME = profile_name
|
|
909
|
+
|
|
910
|
+
self.LCNAME = load_case
|
|
911
|
+
self.LDGR = load_group
|
|
912
|
+
self.TYPE =prestress_type
|
|
913
|
+
self.ORDER = jack_step
|
|
914
|
+
|
|
915
|
+
self.JACK_BEGIN = jack_begin
|
|
916
|
+
self.JACK_END = jack_end
|
|
917
|
+
self.GROUTING = grouting_stage
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
Tendon.Prestress.load.append(self)
|
|
922
|
+
Tendon.Prestress.ids.append(self.ID)
|
|
923
|
+
|
|
203
924
|
|
|
204
|
-
|
|
925
|
+
@classmethod
|
|
926
|
+
def json(cls):
|
|
927
|
+
json = {"Assign": {}}
|
|
928
|
+
for self in cls.load:
|
|
929
|
+
|
|
930
|
+
# Finding Tendon ID
|
|
931
|
+
tdn_id = self.TDN_ID
|
|
932
|
+
if not self.TDN_ID :
|
|
933
|
+
tdn_check=0
|
|
934
|
+
for prof in Tendon.Profile.profiles:
|
|
935
|
+
if prof.NAME == self.TDN_NAME:
|
|
936
|
+
tdn_id = prof.ID
|
|
937
|
+
tdn_check=1
|
|
938
|
+
break
|
|
939
|
+
if not tdn_check:
|
|
940
|
+
print(f'⚠️ "{self.TDN_NAME}" tendon name is not found for Prestress load application. Prestress load skipped.\n📑 Try Tendon.Profile.sync() to retrieve Profile Names first')
|
|
941
|
+
continue
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
if tdn_id not in list(json["Assign"].keys()):
|
|
945
|
+
json["Assign"][tdn_id] = {"ITEMS": []}
|
|
946
|
+
|
|
947
|
+
json["Assign"][tdn_id]["ITEMS"].append({
|
|
948
|
+
"ID": self.ID,
|
|
949
|
+
"LCNAME": self.LCNAME,
|
|
950
|
+
"GROUP_NAME": self.LDGR,
|
|
951
|
+
"TENDON_NAME": self.TDN_NAME,
|
|
952
|
+
"TYPE": self.TYPE,
|
|
953
|
+
"ORDER": self.ORDER,
|
|
954
|
+
"BEGIN": self.JACK_BEGIN,
|
|
955
|
+
"END": self.JACK_END,
|
|
956
|
+
"GROUTING": self.GROUTING
|
|
957
|
+
})
|
|
958
|
+
return json
|
|
959
|
+
|
|
960
|
+
@classmethod
|
|
961
|
+
def create(cls):
|
|
962
|
+
MidasAPI("PUT", "/db/TDPL",cls.json())
|
|
963
|
+
|
|
964
|
+
@classmethod
|
|
965
|
+
def get(cls):
|
|
966
|
+
return MidasAPI("GET", "/db/TDPL")
|
|
967
|
+
|
|
968
|
+
@classmethod
|
|
969
|
+
def delete(cls):
|
|
970
|
+
cls.load=[]
|
|
971
|
+
return MidasAPI("DELETE", "/db/TDPL")
|
|
972
|
+
|
|
973
|
+
@classmethod
|
|
974
|
+
def sync(cls):
|
|
975
|
+
cls.load = []
|
|
976
|
+
a = cls.get()
|
|
977
|
+
if a != {'message': ''}:
|
|
978
|
+
for i in a['TDPL'].keys():
|
|
979
|
+
for j in range(len(a['TDPL'][i]['ITEMS'])):
|
|
980
|
+
Tendon.Prestress(a['TDPL'][i]['ITEMS'][j]['TENDON_NAME'],a['TDPL'][i]['ITEMS'][j]['LCNAME']
|
|
981
|
+
,a['TDPL'][i]['ITEMS'][j]['GROUP_NAME']
|
|
982
|
+
,a['TDPL'][i]['ITEMS'][j]['TYPE']
|
|
983
|
+
,a['TDPL'][i]['ITEMS'][j]['ORDER']
|
|
984
|
+
,a['TDPL'][i]['ITEMS'][j]['BEGIN']
|
|
985
|
+
,a['TDPL'][i]['ITEMS'][j]['END']
|
|
986
|
+
,a['TDPL'][i]['ITEMS'][j]['GROUTING']
|
|
987
|
+
,-(100000*int(i)+int(a['TDPL'][i]['ITEMS'][j]['ID'])))
|