midas-civil 1.4.1__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.
Files changed (40) hide show
  1. midas_civil/_BoundaryChangeAssignment.py +278 -0
  2. midas_civil/__init__.py +51 -0
  3. midas_civil/_analysiscontrol.py +585 -0
  4. midas_civil/_boundary.py +888 -0
  5. midas_civil/_construction.py +1004 -0
  6. midas_civil/_element.py +1346 -0
  7. midas_civil/_group.py +337 -0
  8. midas_civil/_load.py +967 -0
  9. midas_civil/_loadcomb.py +159 -0
  10. midas_civil/_mapi.py +249 -0
  11. midas_civil/_material.py +1692 -0
  12. midas_civil/_model.py +522 -0
  13. midas_civil/_movingload.py +1479 -0
  14. midas_civil/_node.py +532 -0
  15. midas_civil/_result_table.py +929 -0
  16. midas_civil/_result_test.py +5455 -0
  17. midas_civil/_section/_TapdbSecSS.py +175 -0
  18. midas_civil/_section/__init__.py +413 -0
  19. midas_civil/_section/_compositeSS.py +283 -0
  20. midas_civil/_section/_dbSecSS.py +164 -0
  21. midas_civil/_section/_offsetSS.py +53 -0
  22. midas_civil/_section/_pscSS copy.py +455 -0
  23. midas_civil/_section/_pscSS.py +822 -0
  24. midas_civil/_section/_tapPSC12CellSS.py +565 -0
  25. midas_civil/_section/_unSupp.py +58 -0
  26. midas_civil/_settlement.py +161 -0
  27. midas_civil/_temperature.py +677 -0
  28. midas_civil/_tendon.py +1016 -0
  29. midas_civil/_thickness.py +147 -0
  30. midas_civil/_utils.py +529 -0
  31. midas_civil/_utilsFunc/__init__.py +0 -0
  32. midas_civil/_utilsFunc/_line2plate.py +636 -0
  33. midas_civil/_view.py +891 -0
  34. midas_civil/_view_trial.py +430 -0
  35. midas_civil/_visualise.py +347 -0
  36. midas_civil-1.4.1.dist-info/METADATA +74 -0
  37. midas_civil-1.4.1.dist-info/RECORD +40 -0
  38. midas_civil-1.4.1.dist-info/WHEEL +5 -0
  39. midas_civil-1.4.1.dist-info/licenses/LICENSE +21 -0
  40. midas_civil-1.4.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,283 @@
1
+ from ._offsetSS import Offset
2
+ from ._offsetSS import _common
3
+
4
+ class _SS_COMP_PSC_I(_common):
5
+
6
+ """ Create Standard USER DEFINED sections"""
7
+
8
+ def __init__(self,Name='',Symm = True,Joint=[0,0,0,0,0,0,0,0,0],
9
+ Bc=0,tc=0,Hh=0,
10
+ H1=0,
11
+ HL1=0,HL2=0,HL21=0,HL22=0,HL3=0,HL4=0,HL41=0,HL42=0,HL5=0,
12
+ BL1=0,BL2=0,BL21=0,BL22=0,BL4=0,BL41=0,BL42=0,
13
+
14
+ HR1=0,HR2=0,HR21=0,HR22=0,HR3=0,HR4=0,HR41=0,HR42=0,HR5=0,
15
+ BR1=0,BR2=0,BR21=0,BR22=0,BR4=0,BR41=0,BR42=0,
16
+
17
+ EgdEsb =0, DgdDsb=0,Pgd=0,Psb=0,TgdTsb=0,
18
+
19
+ MultiModulus = False,CreepEratio=0,ShrinkEratio=0,
20
+
21
+ Offset:Offset=Offset.CC(),useShear=True,use7Dof=False,id:int=0):
22
+
23
+ self.ID = id
24
+ self.NAME = Name
25
+ self.SHAPE = 'CI'
26
+ self.TYPE = 'COMPOSITE'
27
+
28
+ self.SYMM = bool(Symm)
29
+
30
+ self.BC =Bc
31
+ self.TC =tc
32
+ self.HH =Hh
33
+
34
+ self.MATL_ELAST = EgdEsb
35
+ self.MATL_DENS = DgdDsb
36
+ self.MATL_POIS_S = Pgd
37
+ self.MATL_POIS_C = Psb
38
+ self.MATL_THERMAL = TgdTsb
39
+ self.USE_MULTI_ELAST = MultiModulus
40
+ self.LONGTERM_ESEC = CreepEratio
41
+ self.SHRINK_ESEC = ShrinkEratio
42
+
43
+
44
+ self.J1=bool(Joint[0])
45
+ self.JL1=bool(Joint[1])
46
+ self.JL2=bool(Joint[2])
47
+ self.JL3=bool(Joint[3])
48
+ self.JL4=bool(Joint[4])
49
+
50
+ if self.SYMM:
51
+ self.JR1=bool(Joint[1])
52
+ self.JR2=bool(Joint[2])
53
+ self.JR3=bool(Joint[3])
54
+ self.JR4=bool(Joint[4])
55
+
56
+ self.HR1 = HL1
57
+ self.HR2 = HL2
58
+ self.HR21 = HL21
59
+ self.HR22 = HL22
60
+ self.HR3 = HL3
61
+ self.HR4 = HL4
62
+ self.HR41 = HL41
63
+ self.HR42 = HL42
64
+ self.HR5 = HL5
65
+
66
+ self.BR1 = BL1
67
+ self.BR2 = BL2
68
+ self.BR21 = BL21
69
+ self.BR22 = BL22
70
+ self.BR4 = BL4
71
+ self.BR41 = BL41
72
+ self.BR42 = BL42
73
+ else:
74
+ self.JR1=bool(Joint[5])
75
+ self.JR2=bool(Joint[6])
76
+ self.JR3=bool(Joint[7])
77
+ self.JR4=bool(Joint[8])
78
+
79
+ self.HR1 = HR1
80
+ self.HR2 = HR2
81
+ self.HR21 = HR21
82
+ self.HR22 = HR22
83
+ self.HR3 = HR3
84
+ self.HR4 = HR4
85
+ self.HR41 = HR41
86
+ self.HR42 = HR42
87
+ self.HR5 = HR5
88
+
89
+ self.BR1 = BR1
90
+ self.BR2 = BR2
91
+ self.BR21 = BR21
92
+ self.BR22 = BR22
93
+ self.BR4 = BR4
94
+ self.BR41 = BR41
95
+ self.BR42 = BR42
96
+
97
+ self.OFFSET = Offset
98
+ self.USESHEAR = bool(useShear)
99
+ self.USE7DOF = bool(use7Dof)
100
+
101
+ self.H1 = H1
102
+ self.HL1 = HL1
103
+ self.HL2 = HL2
104
+ self.HL21 = HL21
105
+ self.HL22 = HL22
106
+ self.HL3 = HL3
107
+ self.HL4 = HL4
108
+ self.HL41 = HL41
109
+ self.HL42 = HL42
110
+ self.HL5 = HL5
111
+
112
+ self.BL1 = BL1
113
+ self.BL2 = BL2
114
+ self.BL21 = BL21
115
+ self.BL22 = BL22
116
+ self.BL4 = BL4
117
+ self.BL41 = BL41
118
+ self.BL42 = BL42
119
+
120
+ def __str__(self):
121
+ return f' > ID = {self.ID} | PSC COMPOSITE I SECTION \nJSON = {self.toJSON()}\n'
122
+
123
+
124
+ def toJSON(sect):
125
+ js = {
126
+ "SECTTYPE": sect.TYPE,
127
+ "SECT_NAME": sect.NAME,
128
+ "SECT_BEFORE": {
129
+ "SHAPE": sect.SHAPE,
130
+ "SECT_I": {
131
+ "vSIZE_PSC_A": [sect.H1,sect.HL1,sect.HL2,sect.HL21,sect.HL22,sect.HL3,sect.HL4,sect.HL41,sect.HL42,sect.HL5],
132
+ "vSIZE_PSC_B": [sect.BL1,sect.BL2,sect.BL21,sect.BL22,sect.BL4,sect.BL41,sect.BL42],
133
+ "vSIZE_PSC_C": [sect.HR1,sect.HR2,sect.HR21,sect.HR22,sect.HR3,sect.HR4,sect.HR41,sect.HR42,sect.HR5],
134
+ "vSIZE_PSC_D": [sect.BR1,sect.BR2,sect.BR21,sect.BR22,sect.BR4,sect.BR41,sect.BR42]
135
+ },
136
+ "WARPING_CHK_AUTO_I": True,
137
+ "WARPING_CHK_AUTO_J": True,
138
+ "SHEAR_CHK": True,
139
+ "WARPING_CHK_POS_I": [[0,0,0,0,0,0],[0,0,0,0,0,0]],
140
+ "WARPING_CHK_POS_J": [[0,0,0,0,0,0],[0,0,0,0,0,0]],
141
+ "USE_AUTO_SHEAR_CHK_POS": [[True,False,True],[False,False,False]],
142
+ "USE_WEB_THICK_SHEAR": [[True, True,True],[False,False,False]],
143
+ "SHEAR_CHK_POS": [[0,0,0],[0,0,0]],
144
+ "USE_WEB_THICK": [True,False],
145
+ "WEB_THICK": [0,0],
146
+ "JOINT": [sect.J1,sect.JL1,sect.JL2,sect.JL3,sect.JL4,sect.JR1,sect.JR2,sect.JR3,sect.JR4],
147
+ "MATL_ELAST": sect.MATL_ELAST,
148
+ "MATL_DENS": sect.MATL_DENS,
149
+ "MATL_POIS_S": sect.MATL_POIS_S,
150
+ "MATL_POIS_C": sect.MATL_POIS_C,
151
+ "MATL_THERMAL": sect.MATL_THERMAL,
152
+ "USE_MULTI_ELAST": sect.USE_MULTI_ELAST,
153
+ "LONGTERM_ESEC": sect.LONGTERM_ESEC,
154
+ "SHRINK_ESEC": sect.SHRINK_ESEC,
155
+ },
156
+ "SECT_AFTER": {
157
+ "SLAB": [sect.BC,sect.TC,sect.HH]
158
+ }
159
+ }
160
+ js['SECT_BEFORE'].update(sect.OFFSET.JS)
161
+ js['SECT_BEFORE']['USE_SHEAR_DEFORM'] = sect.USESHEAR
162
+ js['SECT_BEFORE']['USE_WARPING_EFFECT'] = sect.USE7DOF
163
+ return js
164
+
165
+ @staticmethod
166
+ def _objectify(id,name,type,shape,offset,uShear,u7DOF,js):
167
+ vA = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_A']
168
+ vB = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_B']
169
+ vC = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_C']
170
+ vD = js['SECT_BEFORE']['SECT_I']['vSIZE_PSC_D']
171
+ joint = js['SECT_BEFORE']['JOINT']
172
+ slab = js['SECT_AFTER']['SLAB']
173
+ secti = js['SECT_BEFORE']
174
+
175
+ try: e1 = js['SECT_BEFORE']['LONGTERM_ESEC']
176
+ except: e1 = 0
177
+ try: e2 = js['SECT_BEFORE']['SHRINK_ESEC']
178
+ except: e2 = 0
179
+
180
+
181
+ return _SS_COMP_PSC_I(name,False,joint,
182
+ slab[0],slab[1],slab[2],
183
+ vA[0],
184
+ vA[1],vA[2],vA[3],vA[4],vA[5],vA[6],vA[7],vA[8],vA[9],
185
+ vB[0],vB[1],vB[2],vB[3],vB[4],vB[5],vB[6],
186
+ vC[0],vC[1],vC[2],vC[3],vC[4],vC[5],vC[6],vC[7],vC[8],
187
+ vD[0],vD[1],vD[2],vD[3],vD[4],vD[5],vD[6],
188
+ secti['MATL_ELAST'],secti['MATL_DENS'],secti['MATL_POIS_S'],secti['MATL_POIS_C'],secti['MATL_THERMAL'],
189
+ secti['USE_MULTI_ELAST'],e1,e2,
190
+ offset,uShear,u7DOF,id)
191
+
192
+
193
+ class _SS_COMP_STEEL_I_TYPE1(_common):
194
+
195
+ """ Create Standard USER DEFINED sections"""
196
+
197
+ def __init__(self,Name='',
198
+ Bc=0,tc=0,Hh=0,
199
+ Hw=0,B1=0,tf1=0,tw=0,B2=0,tf2=0,
200
+
201
+ EsEc =0, DsDc=0,Ps=0,Pc=0,TsTc=0,
202
+ MultiModulus = False,CreepEratio=0,ShrinkEratio=0,
203
+ Offset:Offset=Offset.CC(),useShear=True,use7Dof=False,id:int=0):
204
+
205
+ self.ID = id
206
+ self.NAME = Name
207
+ self.SHAPE = 'I'
208
+ self.TYPE = 'COMPOSITE'
209
+
210
+ self.BC =Bc
211
+ self.TC =tc
212
+ self.HH =Hh
213
+
214
+ self.HW = Hw
215
+ self.B1 = B1
216
+ self.TF1 = tf1
217
+ self.TW = tw
218
+ self.B2 = B2
219
+ self.TF2 = tf2
220
+
221
+ self.MATL_ELAST = EsEc
222
+ self.MATL_DENS = DsDc
223
+ self.MATL_POIS_S = Ps
224
+ self.MATL_POIS_C = Pc
225
+ self.MATL_THERMAL = TsTc
226
+ self.USE_MULTI_ELAST = MultiModulus
227
+ self.LONGTERM_ESEC = CreepEratio
228
+ self.SHRINK_ESEC = ShrinkEratio
229
+
230
+ self.OFFSET = Offset
231
+ self.USESHEAR = bool(useShear)
232
+ self.USE7DOF = bool(use7Dof)
233
+
234
+ def __str__(self):
235
+ return f' > ID = {self.ID} | STEEL COMPOSITE I SECTION \nJSON = {self.toJSON()}\n'
236
+
237
+
238
+ def toJSON(sect):
239
+ js = {
240
+ "SECTTYPE": sect.TYPE,
241
+ "SECT_NAME": sect.NAME,
242
+ "SECT_BEFORE": {
243
+ "SHAPE": sect.SHAPE,
244
+ "SECT_I": {
245
+ "vSIZE": [sect.HW,sect.TW,sect.B1,sect.TF1,sect.B2,sect.TF2],
246
+ },
247
+
248
+ "MATL_ELAST": sect.MATL_ELAST,
249
+ "MATL_DENS": sect.MATL_DENS,
250
+ "MATL_POIS_S": sect.MATL_POIS_S,
251
+ "MATL_POIS_C": sect.MATL_POIS_C,
252
+ "MATL_THERMAL": sect.MATL_THERMAL,
253
+ "USE_MULTI_ELAST": sect.USE_MULTI_ELAST,
254
+ "LONGTERM_ESEC": sect.LONGTERM_ESEC,
255
+ "SHRINK_ESEC": sect.SHRINK_ESEC,
256
+ },
257
+ "SECT_AFTER": {
258
+ "SLAB": [sect.BC,sect.TC,sect.HH]
259
+ }
260
+ }
261
+ js['SECT_BEFORE'].update(sect.OFFSET.JS)
262
+ js['SECT_BEFORE']['USE_SHEAR_DEFORM'] = sect.USESHEAR
263
+ js['SECT_BEFORE']['USE_WARPING_EFFECT'] = sect.USE7DOF
264
+ return js
265
+
266
+ @staticmethod
267
+ def _objectify(id,name,type,shape,offset,uShear,u7DOF,js):
268
+ vS = js['SECT_BEFORE']['SECT_I']['vSIZE']
269
+ slab = js['SECT_AFTER']['SLAB']
270
+ secti = js['SECT_BEFORE']
271
+
272
+ try: e1 = js['SECT_BEFORE']['LONGTERM_ESEC']
273
+ except: e1 = 0
274
+ try: e2 = js['SECT_BEFORE']['SHRINK_ESEC']
275
+ except: e2 = 0
276
+
277
+
278
+ return _SS_COMP_STEEL_I_TYPE1(name,
279
+ slab[0],slab[1],slab[2],
280
+ vS[0],vS[2],vS[3],vS[1],vS[4],vS[5],
281
+ secti['MATL_ELAST'],secti['MATL_DENS'],secti['MATL_POIS_S'],secti['MATL_POIS_C'],secti['MATL_THERMAL'],
282
+ secti['USE_MULTI_ELAST'],e1,e2,
283
+ offset,uShear,u7DOF,id)
@@ -0,0 +1,164 @@
1
+ from ._offsetSS import Offset
2
+ from ._offsetSS import _common
3
+ from math import sin , cos , pi
4
+
5
+ class _SS_DBUSER(_common):
6
+
7
+ """ Create Standard USER DEFINED sections"""
8
+
9
+ def __init__(self,Name='',Shape='',parameters:list=[],Offset=Offset(),useShear=True,use7Dof=False,id:int=0):
10
+ """ Shape = 'SB' 'SR' for rectangle \n For cylinder"""
11
+ self.ID = id
12
+ self.NAME = Name
13
+ self.TYPE = 'DBUSER'
14
+ self.SHAPE = Shape
15
+ self.PARAMS = parameters
16
+ self.OFFSET = Offset
17
+ self.USESHEAR = useShear
18
+ self.USE7DOF = use7Dof
19
+ self.DATATYPE = 2
20
+
21
+ def __str__(self):
22
+ return f' > ID = {self.ID} | USER DEFINED STANDARD SECTION \nJSON = {self.toJSON()}\n'
23
+
24
+
25
+ def toJSON(sect):
26
+ js = {
27
+ "SECTTYPE": "DBUSER",
28
+ "SECT_NAME": sect.NAME,
29
+ "SECT_BEFORE": {
30
+ "SHAPE": sect.SHAPE,
31
+ "DATATYPE": sect.DATATYPE,
32
+ "SECT_I": {
33
+ "vSIZE": sect.PARAMS
34
+ }
35
+ }
36
+ }
37
+ js['SECT_BEFORE'].update(sect.OFFSET.JS)
38
+ js['SECT_BEFORE']['USE_SHEAR_DEFORM'] = sect.USESHEAR
39
+ js['SECT_BEFORE']['USE_WARPING_EFFECT'] = sect.USE7DOF
40
+ return js
41
+
42
+ @staticmethod
43
+ def _objectify(id,name,type,shape,offset,uShear,u7DOF,js):
44
+ return _SS_DBUSER(name,shape,js['SECT_BEFORE']['SECT_I']['vSIZE'],offset,uShear,u7DOF,id)
45
+
46
+ def _centerLine(shape,*args):
47
+ if shape.SHAPE == 'SB' :
48
+ H,B = shape.PARAMS[:2]
49
+
50
+ sect_lin_con = [[1,2],[3,1]]
51
+
52
+ sect_cg_LT = [-B/2,H/2]
53
+ sect_cg_CC = [0,0]
54
+ sect_cg_RB = [B/2,-H/2]
55
+
56
+ if H > B :
57
+ sect_shape = [[0,0],[0,H/2],[0,-H/2]]
58
+ sect_thk = [B,B]
59
+ sect_thk_off = [0,0]
60
+ else :
61
+ sect_shape = [[0,0],[B/2,0],[-B/2,0]]
62
+ sect_thk = [H,H]
63
+ sect_thk_off = [0,0]
64
+
65
+ elif shape.SHAPE == 'L' :
66
+ H,B,tw,tf = shape.PARAMS[:4]
67
+
68
+ sect_cg_LT = [0,0]
69
+ sect_cg_CC = [(H*tw*tw+B*B*tf)/(2*(B*tw+H*tf)),-(H*H*tw+B*tf*tf)/(2*(B*tw+H*tf))]
70
+ sect_cg_RB = [B,-H]
71
+
72
+ # sect_shape = [[0.5*tw,-H],[0.5*tw,-0.5*tf],[B,-0.5*tf]]
73
+ sect_shape = [[0,-H],[0,0],[B,0]]
74
+ sect_lin_con = [[3,2],[2,1]]
75
+ sect_thk = [tw,tf]
76
+ # sect_thk_off = [0,0]
77
+ sect_thk_off = [tw/2,tf/2]
78
+
79
+ elif shape.SHAPE == 'C' :
80
+ H,B1,tw,tf1,B2,tf2 = shape.PARAMS[:6]
81
+ if B2 == 0 : B2 = B1
82
+ if tf2 == 0 : tf2 = tf1
83
+
84
+ sect_cg_LT = [0,0]
85
+ sect_cg_CC = [(B1+B2)*0.2,-H*0.5]
86
+ sect_cg_RB = [max(B1,B2),-H]
87
+
88
+ # sect_shape = [[0.5*tw,-0.5*tf1],[B1,-0.5*tf1],[0.5*tw,-H+0.5*tf2],[B2,-H+0.5*tf2]]
89
+ sect_shape = [[0,0],[B1,0],[0,-H],[B2,-H]]
90
+ sect_lin_con = [[2,1],[1,3],[3,4]]
91
+ sect_thk = [tf1,tw,tf2]
92
+ # sect_thk_off = [0,0,0]
93
+ sect_thk_off = [tf1/2,tw/2,tf2/2]
94
+
95
+ elif shape.SHAPE == 'H' :
96
+ H,B1,tw,tf1,B2,tf2,r1,r2 = shape.PARAMS[:8]
97
+ if B2 == 0 : B2 = B1
98
+ if tf2 == 0 : tf2 = tf1
99
+
100
+ sect_cg_LT = [-0.5*max(B1,B2),0.5*H]
101
+ sect_cg_CC = [0,0]
102
+ sect_cg_RB = [0.5*max(B1,B2),-0.5*H]
103
+
104
+ sect_shape = [[-0.5*B1,0.5*(H-tf1)],[0,0.5*(H-tf1)],[0.5*B1,0.5*(H-tf1)],[-0.5*B2,-0.5*(H-tf2)],[0,-0.5*(H-tf2)],[0.5*B2,-0.5*(H-tf2)]]
105
+ sect_lin_con = [[2,1],[3,2],[2,5],[4,5],[5,6]]
106
+ sect_thk = [tf1,tf1,tw,tf2,tf2]
107
+ sect_thk_off = [0,0,0,0,0]
108
+
109
+ elif shape.SHAPE == 'T' :
110
+ H,B,tw,tf = shape.PARAMS[:4]
111
+
112
+ sect_cg_LT = [-B*0.5,0]
113
+ sect_cg_CC = [0,-H*0.3]
114
+ sect_cg_RB = [B*0.5,-H]
115
+
116
+ sect_shape = [[-0.5*B,-0.5*tf],[0,-0.5*tf],[0.5*B,-0.5*tf],[0,-H]]
117
+ sect_lin_con = [[2,1],[3,2],[2,4]]
118
+ sect_thk = [tf,tf,tw]
119
+ sect_thk_off = [0,0,0]
120
+
121
+ elif shape.SHAPE == 'B' :
122
+ H,B,tw,tf1,C,tf2 = shape.PARAMS[:6]
123
+ if tf2 == 0 : tf2 = tf1
124
+
125
+ sect_cg_LT = [-0.5*B,0.5*H]
126
+ sect_cg_CC = [0,0]
127
+ sect_cg_RB = [0.5*B,-0.5*H]
128
+
129
+ # sect_shape = [[0.5*(B-tw),0.5*(H-tf1)],[-0.5*(B-tw),0.5*(H-tf1)],[-0.5*(B-tw),-0.5*(H-tf2)],[0.5*(B-tw),-0.5*(H-tf2)]]
130
+ sect_shape = [[0.5*B,0.5*H],[-0.5*B,0.5*H],[-0.5*B,-0.5*H],[0.5*B,-0.5*H]]
131
+
132
+ sect_lin_con = [[1,2],[2,3],[3,4],[4,1]]
133
+ sect_thk = [tf1,tw,tf2,tw]
134
+ # sect_thk_off = [0,0,0,0]
135
+ sect_thk_off = [0.5*tf1,0.5*tw,0.5*tf2,0.5*tw]
136
+
137
+ elif shape.SHAPE == 'P' :
138
+ D,tw = shape.PARAMS[:2]
139
+
140
+ # R = 0.5*(D-tw)
141
+ R = 0.5*D
142
+
143
+ sect_cg_LT = [-R,R]
144
+ sect_cg_CC = [0,0]
145
+ sect_cg_RB = [R,-R]
146
+
147
+ sect_shape = []
148
+ sect_lin_con = []
149
+ sect_thk = []
150
+ sect_thk_off = []
151
+
152
+ n = 16
153
+ for i in range(n):
154
+ sect_shape.append([R*sin(i*2*pi/n),R*cos(i*2*pi/n)])
155
+ sect_lin_con.append([i+1,i+2])
156
+ sect_thk.append(tw)
157
+ sect_thk_off.append(-0.5*tw)
158
+ sect_lin_con[-1] = [i+1,1]
159
+
160
+
161
+
162
+ sect_cg = (sect_cg_LT,sect_cg_CC,sect_cg_RB)
163
+
164
+ return sect_shape, sect_thk ,sect_thk_off, sect_cg , sect_lin_con
@@ -0,0 +1,53 @@
1
+ from midas_civil import MidasAPI
2
+
3
+ class Offset:
4
+ def __init__(self,OffsetPoint='CC',CenterLocation=0,HOffset=0,HOffOpt=0,VOffset=0,VOffOpt=0,UsrOffOpt=0):
5
+
6
+ # self.OFFSET_PT =OffsetPoint
7
+ # self.OFFSET_CENTER =CenterLocation
8
+ # self.HORZ_OFFSET_OPT = HOffOpt
9
+ # self.USERDEF_OFFSET_YI = HOffset
10
+ # self.USERDEF_OFFSET_YJ = HOffset
11
+ # self.VERT_OFFSET_OPT = VOffOpt
12
+ # self.USERDEF_OFFSET_ZI = VOffset
13
+ # self.USERDEF_OFFSET_ZJ = VOffset
14
+ # self.USER_OFFSET_REF = UsrOffOpt
15
+
16
+ self.JS = {
17
+ "OFFSET_PT": OffsetPoint,
18
+ "OFFSET_CENTER": CenterLocation,
19
+
20
+ "USER_OFFSET_REF": UsrOffOpt,
21
+ "HORZ_OFFSET_OPT": HOffOpt,
22
+ "USERDEF_OFFSET_YI": HOffset,
23
+
24
+ "USERDEF_OFFSET_YJ": HOffset, #Tapered only
25
+
26
+ "VERT_OFFSET_OPT": VOffOpt,
27
+ "USERDEF_OFFSET_ZI": VOffset,
28
+
29
+ "USERDEF_OFFSET_ZJ": VOffset, #Tapered only
30
+ }
31
+
32
+
33
+ def __str__(self):
34
+ return str(self.JS)
35
+
36
+ @staticmethod
37
+ def CC():
38
+ return Offset()
39
+
40
+ @staticmethod
41
+ def CT():
42
+ return Offset('CT')
43
+
44
+ @staticmethod
45
+ def CB():
46
+ return Offset('CB')
47
+
48
+
49
+ class _common:
50
+ def update(self):
51
+ js2s = {'Assign':{self.ID : self.toJSON()}}
52
+ MidasAPI('PUT','/db/sect',js2s)
53
+ return js2s