midas-civil 0.1.8__py3-none-any.whl → 0.2.0__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/_construction.py +13 -13
- midas_civil/_movingload.py +2 -2
- midas_civil/_section.py +121 -0
- midas_civil/_tendon.py +6 -0
- {midas_civil-0.1.8.dist-info → midas_civil-0.2.0.dist-info}/METADATA +1 -1
- {midas_civil-0.1.8.dist-info → midas_civil-0.2.0.dist-info}/RECORD +9 -9
- {midas_civil-0.1.8.dist-info → midas_civil-0.2.0.dist-info}/WHEEL +0 -0
- {midas_civil-0.1.8.dist-info → midas_civil-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {midas_civil-0.1.8.dist-info → midas_civil-0.2.0.dist-info}/top_level.txt +0 -0
midas_civil/_construction.py
CHANGED
|
@@ -659,7 +659,7 @@ class CS:
|
|
|
659
659
|
|
|
660
660
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
661
661
|
|
|
662
|
-
class
|
|
662
|
+
class TimeLoad:
|
|
663
663
|
timeloads = []
|
|
664
664
|
|
|
665
665
|
def __init__(self,
|
|
@@ -678,7 +678,7 @@ class CS:
|
|
|
678
678
|
|
|
679
679
|
Examples:
|
|
680
680
|
```python
|
|
681
|
-
CS.
|
|
681
|
+
CS.TimeLoad(10, 35, "DL")
|
|
682
682
|
```
|
|
683
683
|
"""
|
|
684
684
|
|
|
@@ -688,11 +688,11 @@ class CS:
|
|
|
688
688
|
|
|
689
689
|
# Set ID
|
|
690
690
|
if id is None:
|
|
691
|
-
self.ID = len(CS.
|
|
691
|
+
self.ID = len(CS.TimeLoad.timeloads) + 1
|
|
692
692
|
else:
|
|
693
693
|
self.ID = id
|
|
694
694
|
|
|
695
|
-
CS.
|
|
695
|
+
CS.TimeLoad.timeloads.append(self)
|
|
696
696
|
|
|
697
697
|
@classmethod
|
|
698
698
|
def json(cls):
|
|
@@ -700,7 +700,7 @@ class CS:
|
|
|
700
700
|
Converts Time Loads data to JSON format
|
|
701
701
|
Example:
|
|
702
702
|
# Get the JSON data for all time loads
|
|
703
|
-
json_data = CS.
|
|
703
|
+
json_data = CS.TimeLoad.json()
|
|
704
704
|
print(json_data)
|
|
705
705
|
"""
|
|
706
706
|
json_data = {"Assign": {}}
|
|
@@ -722,17 +722,17 @@ class CS:
|
|
|
722
722
|
|
|
723
723
|
@classmethod
|
|
724
724
|
def create(cls):
|
|
725
|
-
"""Creates time loads in the
|
|
725
|
+
"""Creates time loads in the CIVIL NX"""
|
|
726
726
|
return MidasAPI("PUT", "/db/tmld", cls.json())
|
|
727
727
|
|
|
728
728
|
@classmethod
|
|
729
729
|
def get(cls):
|
|
730
|
-
"""Gets time loads data from the
|
|
730
|
+
"""Gets time loads data from the CIVIL NX"""
|
|
731
731
|
return MidasAPI("GET", "/db/tmld")
|
|
732
732
|
|
|
733
733
|
@classmethod
|
|
734
734
|
def sync(cls):
|
|
735
|
-
"""Updates the
|
|
735
|
+
"""Updates the TimeLoad class with data from the CIVIL NX"""
|
|
736
736
|
cls.timeloads = []
|
|
737
737
|
response = cls.get()
|
|
738
738
|
|
|
@@ -750,8 +750,8 @@ class CS:
|
|
|
750
750
|
day = item.get("DAY", 0)
|
|
751
751
|
item_id = item.get("ID", 1)
|
|
752
752
|
|
|
753
|
-
# Create a new
|
|
754
|
-
new_timeload = CS.
|
|
753
|
+
# Create a new TimeLoad object
|
|
754
|
+
new_timeload = CS.TimeLoad(
|
|
755
755
|
element_id=int(element_id),
|
|
756
756
|
day=day,
|
|
757
757
|
group=group_name,
|
|
@@ -759,12 +759,12 @@ class CS:
|
|
|
759
759
|
)
|
|
760
760
|
|
|
761
761
|
# Remove the automatically added instance and replace with synced data
|
|
762
|
-
CS.
|
|
763
|
-
CS.
|
|
762
|
+
CS.TimeLoad.timeloads.pop()
|
|
763
|
+
CS.TimeLoad.timeloads.append(new_timeload)
|
|
764
764
|
|
|
765
765
|
@classmethod
|
|
766
766
|
def delete(cls):
|
|
767
|
-
"""Deletes all time loads from the
|
|
767
|
+
"""Deletes all time loads from the CIVIL NX and python class"""
|
|
768
768
|
cls.timeloads = []
|
|
769
769
|
return MidasAPI("DELETE", "/db/tmld")
|
|
770
770
|
|
midas_civil/_movingload.py
CHANGED
|
@@ -4,7 +4,7 @@ from ._model import *
|
|
|
4
4
|
|
|
5
5
|
# ----------------------------------------------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
def
|
|
7
|
+
def _El_list(Start_id: int, End_id: int) -> list:
|
|
8
8
|
|
|
9
9
|
return list(range(Start_id, End_id + 1))
|
|
10
10
|
|
|
@@ -330,7 +330,7 @@ class MovingLoad:
|
|
|
330
330
|
|
|
331
331
|
data = {"Assign": {}}
|
|
332
332
|
for lane in lanes_list:
|
|
333
|
-
E_list =
|
|
333
|
+
E_list = _El_list(lane.Elment_start, lane.Elemnt_end)
|
|
334
334
|
Load_Dist = "CROSS" if lane.Group_Name else "LANE"
|
|
335
335
|
opt_auto_lane = lane.width > 0 or lane.opt_width > 0
|
|
336
336
|
|
midas_civil/_section.py
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
from ._mapi import *
|
|
2
|
+
import numpy as np
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def _poly_dir(poly,rot='CCW'):
|
|
6
|
+
outer_cg = np.mean(poly,axis=0)
|
|
7
|
+
outer_t = np.subtract(poly,outer_cg)
|
|
8
|
+
dir = 0
|
|
9
|
+
for i in range(len(poly)-1):
|
|
10
|
+
dir+=outer_t[i][0]*outer_t[i+1][1]-outer_t[i][1]*outer_t[i+1][0]
|
|
11
|
+
if dir < 0:
|
|
12
|
+
poly.reverse()
|
|
13
|
+
|
|
14
|
+
if rot == 'CW':
|
|
15
|
+
poly.reverse()
|
|
16
|
+
|
|
17
|
+
return poly
|
|
2
18
|
|
|
3
19
|
|
|
4
20
|
|
|
@@ -104,6 +120,66 @@ def _Obj2JS(sect):
|
|
|
104
120
|
"JOINT": [sect.J1,sect.JL1,sect.JL2,sect.JL3,sect.JL4,sect.JR1,sect.JR2,sect.JR3,sect.JR4]
|
|
105
121
|
}
|
|
106
122
|
}
|
|
123
|
+
elif sect.SHAPE in ['VALUE']:
|
|
124
|
+
js = {
|
|
125
|
+
"SECTTYPE": "PSC",
|
|
126
|
+
"SECT_NAME": sect.NAME,
|
|
127
|
+
"CALC_OPT": True,
|
|
128
|
+
"SECT_BEFORE": {
|
|
129
|
+
"SHAPE": "VALU",
|
|
130
|
+
"SECT_I": {
|
|
131
|
+
"SECT_NAME": "",
|
|
132
|
+
"vSIZE": [0.1, 0.1, 0.1, 0.1],
|
|
133
|
+
"OUTER_POLYGON": [
|
|
134
|
+
{
|
|
135
|
+
"VERTEX": [
|
|
136
|
+
{"X": 5, "Y": 5},
|
|
137
|
+
{"X": -5, "Y": 5}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"SHEAR_CHK": True,
|
|
143
|
+
"SHEAR_CHK_POS": [[0.1, 0, 0.1], [0, 0, 0]],
|
|
144
|
+
"USE_AUTO_QY": [[True, True, True], [False, False, False]],
|
|
145
|
+
"WEB_THICK": [0, 0],
|
|
146
|
+
"USE_WEB_THICK_SHEAR": [[True, True, True], [False, False, False]]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
v_list = []
|
|
151
|
+
for i in sect.OUTER_POLYGON:
|
|
152
|
+
v_list.append({"X":i[0],"Y":i[1]})
|
|
153
|
+
js["SECT_BEFORE"]["SECT_I"]["OUTER_POLYGON"][0]["VERTEX"] =v_list
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
if sect.N_INNER_POLYGON > 0 :
|
|
158
|
+
|
|
159
|
+
js["SECT_BEFORE"]["SECT_I"]["INNER_POLYGON"]= []
|
|
160
|
+
|
|
161
|
+
mult_ver = []
|
|
162
|
+
for n in range(sect.N_INNER_POLYGON):
|
|
163
|
+
vi_list = []
|
|
164
|
+
|
|
165
|
+
js["SECT_BEFORE"]["SECT_I"]["INNER_POLYGON"]= [
|
|
166
|
+
{
|
|
167
|
+
"VERTEX": []
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
for i in sect.INNER_POLYGON[n]:
|
|
171
|
+
vi_list.append({"X":i[0],"Y":i[1]})
|
|
172
|
+
|
|
173
|
+
ver_json = {"VERTEX": vi_list}
|
|
174
|
+
mult_ver.append(ver_json)
|
|
175
|
+
|
|
176
|
+
js["SECT_BEFORE"]["SECT_I"]["INNER_POLYGON"] = mult_ver
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
107
183
|
|
|
108
184
|
elif sect.TYPE == 'COMPOSITE':
|
|
109
185
|
if sect.SHAPE in ['CI']:
|
|
@@ -573,6 +649,51 @@ class Section:
|
|
|
573
649
|
|
|
574
650
|
_SectionADD(self)
|
|
575
651
|
|
|
652
|
+
class Value(_common):
|
|
653
|
+
def __init__(self,Name:str,
|
|
654
|
+
OuterPolygon:list,InnerPolygon:list=[],
|
|
655
|
+
Offset:Offset=Offset.CC(),useShear=True,use7Dof=False,id:int=0):
|
|
656
|
+
|
|
657
|
+
'''
|
|
658
|
+
Outer Polygon -> List of points ; Last input is different from first
|
|
659
|
+
[(0,0),(1,0),(1,1),(0,1)]
|
|
660
|
+
Inner Polygon -> List of points ; Last input is different from first
|
|
661
|
+
Only one inner polygon
|
|
662
|
+
'''
|
|
663
|
+
|
|
664
|
+
self.ID = id
|
|
665
|
+
self.NAME = Name
|
|
666
|
+
self.SHAPE = 'VALUE'
|
|
667
|
+
self.TYPE = 'PSC'
|
|
668
|
+
|
|
669
|
+
self.OFFSET = Offset
|
|
670
|
+
self.USESHEAR = bool(useShear)
|
|
671
|
+
self.USE7DOF = bool(use7Dof)
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
self.OUTER_POLYGON = _poly_dir(OuterPolygon)
|
|
675
|
+
self.INNER_POLYGON = []
|
|
676
|
+
self.N_INNER_POLYGON = 0
|
|
677
|
+
|
|
678
|
+
temp_arr = []
|
|
679
|
+
|
|
680
|
+
# Finding no. of internal polygons
|
|
681
|
+
if InnerPolygon != []:
|
|
682
|
+
if not isinstance(InnerPolygon[0][0],(int,float)):
|
|
683
|
+
self.N_INNER_POLYGON = len(InnerPolygon)
|
|
684
|
+
temp_arr = InnerPolygon
|
|
685
|
+
|
|
686
|
+
else:
|
|
687
|
+
temp_arr.append(InnerPolygon) #Convert to list
|
|
688
|
+
self.N_INNER_POLYGON = 1
|
|
689
|
+
|
|
690
|
+
for i in range(len(temp_arr)):
|
|
691
|
+
self.INNER_POLYGON.append(_poly_dir(temp_arr[i],'CW'))
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
_SectionADD(self)
|
|
695
|
+
|
|
696
|
+
|
|
576
697
|
class Composite:
|
|
577
698
|
class PSCI(_common):
|
|
578
699
|
|
midas_civil/_tendon.py
CHANGED
|
@@ -860,6 +860,12 @@ class Tendon:
|
|
|
860
860
|
def get(cls):
|
|
861
861
|
return MidasAPI('GET','/db/TDNA')
|
|
862
862
|
|
|
863
|
+
@classmethod
|
|
864
|
+
def delete(cls):
|
|
865
|
+
cls.profiles=[]
|
|
866
|
+
cls.ids=[]
|
|
867
|
+
return MidasAPI('DELETE','/db/TDNA')
|
|
868
|
+
|
|
863
869
|
@classmethod
|
|
864
870
|
def sync(cls):
|
|
865
871
|
a = cls.get()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
midas_civil/__init__.py,sha256=t0XkmZiEBYodUkU2gJWLQmqrpQdZc8ikPM3Z0xrSVPg,575
|
|
2
2
|
midas_civil/_boundary.py,sha256=s5mgZIc1b0-P7AdWuaPAQ5cIbHL5CR1YRKJA7KE4W_U,32958
|
|
3
|
-
midas_civil/_construction.py,sha256=
|
|
3
|
+
midas_civil/_construction.py,sha256=q9C3gGdvky5t7jCDzd6lBRv6pm8cMycI91xfkgDV37Y,40673
|
|
4
4
|
midas_civil/_construction_backup.py,sha256=Pj7V-NYCkkT-aMjKXfs1jKa9klsGh48UXDLwn3BLYTY,18225
|
|
5
5
|
midas_civil/_element.py,sha256=4IjJSlsXMr2llv7gC66KBxPoikt9rWbwGBePMaH9gYg,26935
|
|
6
6
|
midas_civil/_group.py,sha256=9EsPGW8lWpzJBW25Gfd-G5S_9oP8ER3zNzeqknDsfmw,11480
|
|
@@ -8,20 +8,20 @@ midas_civil/_load.py,sha256=kPDcgyd-D_HD59ABQuYmry92ruCovdYos65g06wMq84,30360
|
|
|
8
8
|
midas_civil/_mapi.py,sha256=Fabn3QX6OHJeV_s_01KMvOwkSye0kfgpiUUgPplAzxA,4597
|
|
9
9
|
midas_civil/_material.py,sha256=uJEIHJM9OhwTRWUI2mtd_0BQSxdlYhATYJu9P7tNNBA,69511
|
|
10
10
|
midas_civil/_model.py,sha256=G5Kh7u2DSodvKGQ0fOzAUx4Ilj8-rn-nGDTFeI6AkUU,16442
|
|
11
|
-
midas_civil/_movingload.py,sha256=
|
|
11
|
+
midas_civil/_movingload.py,sha256=kzTbi4vFjOnUYOyhDDTmSHFU-sDGb_MgMBNXUmFmUZc,80001
|
|
12
12
|
midas_civil/_node.py,sha256=wRttDbebQWT6aZWeNd72AgzVWUETyNzMng5kJQmV3WM,4760
|
|
13
13
|
midas_civil/_result copy.py,sha256=siTMENLIwF_6rvydSjP9aQAWaIlt0pReiqNyDhDevGk,24290
|
|
14
14
|
midas_civil/_result.py,sha256=ZJf2CQG2ZjlTKuWo3zBnG7W8EwI1UkhWhWJVWRzlXUU,7640
|
|
15
15
|
midas_civil/_result_extract.py,sha256=J-9eeWDbFeaDL-C41TAynYuooiHYsayAe3WbfGRO8sM,5537
|
|
16
|
-
midas_civil/_section.py,sha256
|
|
16
|
+
midas_civil/_section.py,sha256=-mpGOYceus_dURE80lsGExSBDDpqDKqsNjBeOE3kZEM,36433
|
|
17
17
|
midas_civil/_settlement.py,sha256=U7lJYBqGbuCv7qziEEznDyA4M_SCjJeIjc0lDeGfE4Y,5125
|
|
18
18
|
midas_civil/_temperature.py,sha256=EfvivFWfxyM8yFCvWJgXLhaCofGwLKEBGFUuW8yHnfQ,24209
|
|
19
|
-
midas_civil/_tendon.py,sha256=
|
|
19
|
+
midas_civil/_tendon.py,sha256=Qt3mPawTT1qeBEqLupUzQKlrT-2mpJ9Togj9rF-K80s,33463
|
|
20
20
|
midas_civil/_thickness.py,sha256=4xQsLA3Q_gIGCwLc_glFmiErdWdQUSwhlEhJ_IPJseA,3248
|
|
21
21
|
midas_civil/_utils.py,sha256=eymiqO8KaTKdhVY3saebqNS0BbUUmGmgw3-ELKqew0A,2611
|
|
22
22
|
midas_civil/_view.py,sha256=o7rkfoQzmgAb3dT0ujPIQLVwVlveo3rMRIbZU1UosZo,849
|
|
23
|
-
midas_civil-0.
|
|
24
|
-
midas_civil-0.
|
|
25
|
-
midas_civil-0.
|
|
26
|
-
midas_civil-0.
|
|
27
|
-
midas_civil-0.
|
|
23
|
+
midas_civil-0.2.0.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
|
|
24
|
+
midas_civil-0.2.0.dist-info/METADATA,sha256=ghutGORe9iMlEhGTgd_BAsbUUPIZTCuCXR1DcmunLOM,1709
|
|
25
|
+
midas_civil-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
midas_civil-0.2.0.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
|
|
27
|
+
midas_civil-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|