midas-civil 0.1.1__tar.gz → 0.1.3__tar.gz
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-0.1.1 → midas_civil-0.1.3}/PKG-INFO +1 -1
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_boundary.py +1 -1
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_group.py +10 -1
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_node.py +24 -4
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_thickness.py +6 -3
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil.egg-info/PKG-INFO +1 -1
- {midas_civil-0.1.1 → midas_civil-0.1.3}/setup.py +1 -1
- {midas_civil-0.1.1 → midas_civil-0.1.3}/LICENSE +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/README.md +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/__init__.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_construction.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_construction_backup.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_element.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_load.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_mapi.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_material.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_model.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_result copy.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_result.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_result_extract.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_section.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_temperature.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_tendon.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_utils.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil/_view.py +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil.egg-info/SOURCES.txt +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil.egg-info/dependency_links.txt +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil.egg-info/requires.txt +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/midas_civil.egg-info/top_level.txt +0 -0
- {midas_civil-0.1.1 → midas_civil-0.1.3}/setup.cfg +0 -0
|
@@ -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
|
|
|
@@ -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,11 +115,11 @@ class Node:
|
|
|
95
115
|
|
|
96
116
|
@staticmethod
|
|
97
117
|
def sync():
|
|
118
|
+
Node.nodes = []
|
|
119
|
+
Node.ids=[]
|
|
98
120
|
a = Node.get()
|
|
99
121
|
if a != {'message': ''}:
|
|
100
122
|
if list(a['NODE'].keys()) != []:
|
|
101
|
-
Node.nodes = []
|
|
102
|
-
Node.ids=[]
|
|
103
123
|
for j in a['NODE'].keys():
|
|
104
124
|
Node(round(a['NODE'][j]['X'],6), round(a['NODE'][j]['Y'],6), round(a['NODE'][j]['Z'],6),int(j),0)
|
|
105
125
|
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|