midas-civil 0.1.2__py3-none-any.whl → 0.1.4__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/_boundary.py +1 -1
- midas_civil/_group.py +10 -1
- midas_civil/_node.py +27 -5
- midas_civil/_thickness.py +6 -3
- {midas_civil-0.1.2.dist-info → midas_civil-0.1.4.dist-info}/METADATA +1 -1
- {midas_civil-0.1.2.dist-info → midas_civil-0.1.4.dist-info}/RECORD +9 -9
- {midas_civil-0.1.2.dist-info → midas_civil-0.1.4.dist-info}/WHEEL +0 -0
- {midas_civil-0.1.2.dist-info → midas_civil-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {midas_civil-0.1.2.dist-info → midas_civil-0.1.4.dist-info}/top_level.txt +0 -0
midas_civil/_boundary.py
CHANGED
midas_civil/_group.py
CHANGED
|
@@ -18,6 +18,16 @@ def _add_elem_2_stGroup(elemID,groupName):
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
def _add_node_2_stGroup(nodeID,groupName):
|
|
22
|
+
up = 0
|
|
23
|
+
if groupName in Group.Structure._names:
|
|
24
|
+
for i in Group.Structure.Groups:
|
|
25
|
+
if i.NAME == groupName:
|
|
26
|
+
i.NLIST = list(i.NLIST + [nodeID])
|
|
27
|
+
else:
|
|
28
|
+
Group.Structure(groupName)
|
|
29
|
+
_add_node_2_stGroup(nodeID,groupName)
|
|
30
|
+
|
|
21
31
|
|
|
22
32
|
#---------------------------------------------------------------------------------------------------------------
|
|
23
33
|
class Group:
|
|
@@ -43,7 +53,6 @@ class Group:
|
|
|
43
53
|
cls.Load.delete()
|
|
44
54
|
cls.Tendon.delete()
|
|
45
55
|
|
|
46
|
-
pass
|
|
47
56
|
|
|
48
57
|
|
|
49
58
|
|
midas_civil/_node.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
from ._mapi import *
|
|
3
3
|
from ._utils import *
|
|
4
4
|
from math import hypot
|
|
5
|
-
|
|
5
|
+
from ._group import _add_node_2_stGroup
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -20,7 +20,24 @@ class Node:
|
|
|
20
20
|
nodes = []
|
|
21
21
|
ids = []
|
|
22
22
|
Grid ={}
|
|
23
|
-
def __init__(self,x,y,z,id=0,merge=1):
|
|
23
|
+
def __init__(self,x,y,z,id=0,group='',merge=1):
|
|
24
|
+
''' Create Node object
|
|
25
|
+
|
|
26
|
+
Parameters:
|
|
27
|
+
x: X - ordinate of node
|
|
28
|
+
y: Y - ordinate of node
|
|
29
|
+
z: Z - ordinate of node
|
|
30
|
+
id: Node ID (default 0 for auto-increment)
|
|
31
|
+
mat: Material property number (default 1)
|
|
32
|
+
group: Structure group of the element (str or list; 'SG1' or ['SG1','SG2'])
|
|
33
|
+
merge: If enabled, checks for existing nodes and return their IDs. No additional/duplicate node will be created.
|
|
34
|
+
|
|
35
|
+
Examples:
|
|
36
|
+
```python
|
|
37
|
+
Node(0,0,0, id =1 , group = 'Support', merge=1)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
'''
|
|
24
41
|
|
|
25
42
|
|
|
26
43
|
#----------------- ORIGINAL -----------------------
|
|
@@ -38,6 +55,7 @@ class Node:
|
|
|
38
55
|
if id == 0 : self.ID = node_count
|
|
39
56
|
if id != 0 : self.ID = id
|
|
40
57
|
|
|
58
|
+
|
|
41
59
|
#REPLACE - No merge check
|
|
42
60
|
if id in Node.ids:
|
|
43
61
|
index=Node.ids.index(id)
|
|
@@ -75,6 +93,8 @@ class Node:
|
|
|
75
93
|
Node.nodes.append(self)
|
|
76
94
|
Node.ids.append(self.ID)
|
|
77
95
|
Node.Grid[cell_loc].append(self)
|
|
96
|
+
|
|
97
|
+
_add_node_2_stGroup(self.ID,group)
|
|
78
98
|
|
|
79
99
|
|
|
80
100
|
|
|
@@ -95,13 +115,14 @@ class Node:
|
|
|
95
115
|
|
|
96
116
|
@staticmethod
|
|
97
117
|
def sync():
|
|
118
|
+
Node.nodes=[]
|
|
119
|
+
Node.ids=[]
|
|
120
|
+
Node.Grid={}
|
|
98
121
|
a = Node.get()
|
|
99
122
|
if a != {'message': ''}:
|
|
100
123
|
if list(a['NODE'].keys()) != []:
|
|
101
|
-
Node.nodes = []
|
|
102
|
-
Node.ids=[]
|
|
103
124
|
for j in a['NODE'].keys():
|
|
104
|
-
Node(round(a['NODE'][j]['X'],6), round(a['NODE'][j]['Y'],6), round(a['NODE'][j]['Z'],6),int(j),0)
|
|
125
|
+
Node(round(a['NODE'][j]['X'],6), round(a['NODE'][j]['Y'],6), round(a['NODE'][j]['Z'],6), id=int(j), group='', merge=0)
|
|
105
126
|
|
|
106
127
|
@staticmethod
|
|
107
128
|
def delete2(nodes_list):
|
|
@@ -122,6 +143,7 @@ class Node:
|
|
|
122
143
|
MidasAPI("DELETE",f"/db/NODE/")
|
|
123
144
|
Node.nodes=[]
|
|
124
145
|
Node.ids=[]
|
|
146
|
+
Node.Grid={}
|
|
125
147
|
|
|
126
148
|
@staticmethod
|
|
127
149
|
def delete():
|
midas_civil/_thickness.py
CHANGED
|
@@ -28,7 +28,7 @@ def _ThikADD(self):
|
|
|
28
28
|
|
|
29
29
|
def _updateThik(self):
|
|
30
30
|
js2s = {'Assign':{self.ID : _Obj2JS(self)}}
|
|
31
|
-
MidasAPI('PUT','/db/
|
|
31
|
+
MidasAPI('PUT','/db/THIK',js2s)
|
|
32
32
|
return js2s
|
|
33
33
|
|
|
34
34
|
|
|
@@ -53,7 +53,8 @@ def _JS2Obj(id,js):
|
|
|
53
53
|
binout = js['bINOUT']
|
|
54
54
|
t_in = js['T_IN']
|
|
55
55
|
t_out = js['T_OUT']
|
|
56
|
-
offset = js['OFFSET']
|
|
56
|
+
try : offset = js['OFFSET']
|
|
57
|
+
except: offset = 0
|
|
57
58
|
off_value = js['O_VALUE']
|
|
58
59
|
|
|
59
60
|
t_out2=-1
|
|
@@ -79,7 +80,9 @@ class Thickness(_common):
|
|
|
79
80
|
|
|
80
81
|
def __init__(self,thick=0.0,thick_out=-1,offset=0,off_type='rat',name="",id=0):
|
|
81
82
|
self.ID = id
|
|
82
|
-
|
|
83
|
+
if name == "":
|
|
84
|
+
self.NAME = thick
|
|
85
|
+
else: self.NAME = name
|
|
83
86
|
self.TYPE = 'VALUE'
|
|
84
87
|
self.T_IN = thick
|
|
85
88
|
self.bINOUT = True
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
midas_civil/__init__.py,sha256=ZMBbIpDOrV647HRaVhLuk6G4vdMWSL0tVbZ6eejWIms,520
|
|
2
|
-
midas_civil/_boundary.py,sha256=
|
|
2
|
+
midas_civil/_boundary.py,sha256=zXoVbZfvWnCIrSdN1lvUAj7cgzxzY3-U1-3ejVzwFfE,32701
|
|
3
3
|
midas_civil/_construction.py,sha256=EqpJ46w4dqtlmk8dy9ChQq2cF-R2duXcgmpJy4cWLz0,19965
|
|
4
4
|
midas_civil/_construction_backup.py,sha256=Pj7V-NYCkkT-aMjKXfs1jKa9klsGh48UXDLwn3BLYTY,18225
|
|
5
5
|
midas_civil/_element.py,sha256=DhUHJVPwuBkl0AbUOZ6RamEUbAoGiJCKmMbiKbFXOzs,19847
|
|
6
|
-
midas_civil/_group.py,sha256=
|
|
6
|
+
midas_civil/_group.py,sha256=43zxSn-A1214_mLu_MpHQHBW9zKOVXpm4ZzRFKyQBj4,10875
|
|
7
7
|
midas_civil/_load.py,sha256=Wg2Cyn7meaCkb28vQSxWi1H1slBQKXdXyoKPGvsHesQ,29557
|
|
8
8
|
midas_civil/_mapi.py,sha256=NImeBj8L7rwrYuaeXbaU3-UnCL4Fyp6tB1wf0UpdQp8,2354
|
|
9
9
|
midas_civil/_material.py,sha256=uJEIHJM9OhwTRWUI2mtd_0BQSxdlYhATYJu9P7tNNBA,69511
|
|
10
10
|
midas_civil/_model.py,sha256=uj_nenNqNLYgwLKB6BZXEPGEByME23gVA5u3EXRZuAA,16337
|
|
11
|
-
midas_civil/_node.py,sha256
|
|
11
|
+
midas_civil/_node.py,sha256=-ACiVbstvq76dGJeDYDPbaFLTZkFvQucVr4jYuFZGQc,4356
|
|
12
12
|
midas_civil/_result copy.py,sha256=siTMENLIwF_6rvydSjP9aQAWaIlt0pReiqNyDhDevGk,24290
|
|
13
13
|
midas_civil/_result.py,sha256=0c_lBai5ayvoOK4zD6jBDYBcqixCAljq5qJyZ4koboI,7648
|
|
14
14
|
midas_civil/_result_extract.py,sha256=0Uyhcr2kDUZ4GWIfMgEkcTQacKt5GJcE4jQ_7YgRbBY,5178
|
|
15
15
|
midas_civil/_section.py,sha256=56RWJdyvDr7Es7Is8Fxq3jPCPP57WW8ECCYZzhm6bf0,26375
|
|
16
16
|
midas_civil/_temperature.py,sha256=ZFs5COZh7QFe-xpWNK44u8IqlqMfaOklAo_ZOVAzFok,13047
|
|
17
17
|
midas_civil/_tendon.py,sha256=XDG9gNETffkv6WtjoEHGZu66PQe8iNBS_G6j4miN-Sg,6845
|
|
18
|
-
midas_civil/_thickness.py,sha256=
|
|
18
|
+
midas_civil/_thickness.py,sha256=ZykgufMkk8d4SARcmaXjgM0sSgm51Yze_1r-ihVE_vs,3243
|
|
19
19
|
midas_civil/_utils.py,sha256=eymiqO8KaTKdhVY3saebqNS0BbUUmGmgw3-ELKqew0A,2611
|
|
20
20
|
midas_civil/_view.py,sha256=68gfsyN6QJ2B5CopNVlP3MQ-833MxfrVWz7p_hMdm4c,701
|
|
21
|
-
midas_civil-0.1.
|
|
22
|
-
midas_civil-0.1.
|
|
23
|
-
midas_civil-0.1.
|
|
24
|
-
midas_civil-0.1.
|
|
25
|
-
midas_civil-0.1.
|
|
21
|
+
midas_civil-0.1.4.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
|
|
22
|
+
midas_civil-0.1.4.dist-info/METADATA,sha256=xjXNBMISstZT1Xni-M_2MHoUQVCEmSNvuURUbXJHQjk,1709
|
|
23
|
+
midas_civil-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
midas_civil-0.1.4.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
|
|
25
|
+
midas_civil-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|