midas-civil 0.1.4__tar.gz → 0.1.5__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.4 → midas_civil-0.1.5}/PKG-INFO +1 -1
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/__init__.py +3 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_element.py +7 -7
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_group.py +20 -2
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_mapi.py +18 -5
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_model.py +3 -0
- midas_civil-0.1.5/midas_civil/_movingload.py +1431 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_node.py +6 -4
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_result.py +2 -2
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_result_extract.py +17 -9
- midas_civil-0.1.5/midas_civil/_settlement.py +160 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_temperature.py +262 -1
- midas_civil-0.1.5/midas_civil/_tendon.py +968 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_thickness.py +1 -1
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil.egg-info/PKG-INFO +1 -1
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil.egg-info/SOURCES.txt +2 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/setup.py +1 -1
- midas_civil-0.1.4/midas_civil/_tendon.py +0 -204
- {midas_civil-0.1.4 → midas_civil-0.1.5}/LICENSE +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/README.md +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_boundary.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_construction.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_construction_backup.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_load.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_material.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_result copy.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_section.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_utils.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil/_view.py +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil.egg-info/dependency_links.txt +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil.egg-info/requires.txt +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/midas_civil.egg-info/top_level.txt +0 -0
- {midas_civil-0.1.4 → midas_civil-0.1.5}/setup.cfg +0 -0
|
@@ -32,7 +32,7 @@ def _ADD(self):
|
|
|
32
32
|
Element.ids.append(int(self.ID))
|
|
33
33
|
|
|
34
34
|
# ------------ Group assignment -----------------------
|
|
35
|
-
if self._GROUP ==
|
|
35
|
+
if self._GROUP == "" :
|
|
36
36
|
pass
|
|
37
37
|
elif isinstance(self._GROUP, list):
|
|
38
38
|
for gpName in self._GROUP:
|
|
@@ -117,17 +117,17 @@ def _JS2Obj(id, js):
|
|
|
117
117
|
t_limit = js.get('T_LIMIT')
|
|
118
118
|
|
|
119
119
|
if elem_type == 'BEAM':
|
|
120
|
-
Element.Beam(args['node'][0], args['node'][1], args['mat'], args['sect'], args['angle'], args['id'])
|
|
120
|
+
Element.Beam(args['node'][0], args['node'][1], args['mat'], args['sect'], args['angle'], '', args['id'])
|
|
121
121
|
elif elem_type == 'TRUSS':
|
|
122
|
-
Element.Truss(args['node'][0], args['node'][1], args['mat'], args['sect'], args['angle'],
|
|
122
|
+
Element.Truss(args['node'][0], args['node'][1], args['mat'], args['sect'], args['angle'],'', args['id'])
|
|
123
123
|
elif elem_type == 'PLATE':
|
|
124
|
-
Element.Plate(args['node'], args['stype'], args['mat'], args['sect'], args['angle'], args['id'])
|
|
124
|
+
Element.Plate(args['node'], args['stype'], args['mat'], args['sect'], args['angle'], '', args['id'])
|
|
125
125
|
elif elem_type == 'TENSTR':
|
|
126
|
-
Element.Tension(args['node'][0], args['node'][1], args['stype'], args['mat'], args['sect'], args['angle'], args['id'], non_len, cable_type, tens, t_limit)
|
|
126
|
+
Element.Tension(args['node'][0], args['node'][1], args['stype'], args['mat'], args['sect'], args['angle'], '', args['id'], non_len, cable_type, tens, t_limit)
|
|
127
127
|
elif elem_type == 'COMPTR':
|
|
128
|
-
Element.Compression(args['node'][0], args['node'][1], args['stype'], args['mat'], args['sect'], args['angle'], args['id'], tens, t_limit, non_len)
|
|
128
|
+
Element.Compression(args['node'][0], args['node'][1], args['stype'], args['mat'], args['sect'], args['angle'], '', args['id'], tens, t_limit, non_len)
|
|
129
129
|
elif elem_type == 'SOLID':
|
|
130
|
-
Element.Solid(nodes=args['node'], mat=args['mat'], sect=args['sect'], id=args['id'])
|
|
130
|
+
Element.Solid(nodes=args['node'], mat=args['mat'], sect=args['sect'],group='', id=args['id'])
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
class _common:
|
|
@@ -3,8 +3,27 @@ from ._mapi import *
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
# ----------- HELPER FUNCTION -----------
|
|
7
|
-
# --------
|
|
9
|
+
# -------- RETRIEVE NODE / ELEMENT FROM STRUCTURE GROUP -------
|
|
10
|
+
|
|
11
|
+
def getNode(groupName):
|
|
12
|
+
''' Returns Node ID list in a Structure Group '''
|
|
13
|
+
for i in Group.Structure.Groups:
|
|
14
|
+
if i.NAME == groupName:
|
|
15
|
+
return i.NLIST
|
|
16
|
+
return []
|
|
17
|
+
|
|
18
|
+
def getElement(groupName):
|
|
19
|
+
''' Returns Element ID list in a Structure Group '''
|
|
20
|
+
for i in Group.Structure.Groups:
|
|
21
|
+
if i.NAME == groupName:
|
|
22
|
+
return i.ELIST
|
|
23
|
+
return []
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# -------- ADD ELEMENT TO STRUCTURE GROUP -------
|
|
8
27
|
|
|
9
28
|
def _add_elem_2_stGroup(elemID,groupName):
|
|
10
29
|
up = 0
|
|
@@ -19,7 +38,6 @@ def _add_elem_2_stGroup(elemID,groupName):
|
|
|
19
38
|
|
|
20
39
|
|
|
21
40
|
def _add_node_2_stGroup(nodeID,groupName):
|
|
22
|
-
up = 0
|
|
23
41
|
if groupName in Group.Structure._names:
|
|
24
42
|
for i in Group.Structure.Groups:
|
|
25
43
|
if i.NAME == groupName:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
import sys
|
|
3
|
+
import winreg
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
def Midas_help():
|
|
@@ -8,6 +9,8 @@ def Midas_help():
|
|
|
8
9
|
print("| HELP MANUAL : https://midas-rnd.github.io/midasapi-python/ |")
|
|
9
10
|
print("---"*22,"\n")
|
|
10
11
|
|
|
12
|
+
|
|
13
|
+
|
|
11
14
|
class MAPI_PRODUCT:
|
|
12
15
|
product = "civil"
|
|
13
16
|
|
|
@@ -19,16 +22,26 @@ class MAPI_PRODUCT:
|
|
|
19
22
|
|
|
20
23
|
class MAPI_KEY:
|
|
21
24
|
"""MAPI key from Civil NX.\n\nEg: MAPI_Key("eadsfjaks568wqehhf.ajkgj345")"""
|
|
22
|
-
data =
|
|
25
|
+
data = ""
|
|
23
26
|
|
|
24
27
|
def __init__(self, mapi_key:str):
|
|
25
|
-
MAPI_KEY.data =
|
|
26
|
-
self.KEY = mapi_key
|
|
27
|
-
MAPI_KEY.data.append(self.KEY)
|
|
28
|
+
MAPI_KEY.data = mapi_key
|
|
28
29
|
|
|
29
30
|
@classmethod
|
|
30
31
|
def get_key(cls):
|
|
31
|
-
|
|
32
|
+
if MAPI_KEY.data == "":
|
|
33
|
+
try:
|
|
34
|
+
key_path = r"Software\\MIDAS\\CVLwNX_US\\CONNECTION"
|
|
35
|
+
registry_key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_path, 0, winreg.KEY_READ)
|
|
36
|
+
value = winreg.QueryValueEx(registry_key, "Key")
|
|
37
|
+
my_key = value[0]
|
|
38
|
+
print(' 🔑 MAPI KEY is not defined. MAPI-KEY is taken from Registry entry.')
|
|
39
|
+
MAPI_KEY(my_key)
|
|
40
|
+
except:
|
|
41
|
+
print(f"🔑 MAPI KEY is not defined. Click on Apps > API Settings to copy the MAPI Key.")
|
|
42
|
+
sys.exit(0)
|
|
43
|
+
else:
|
|
44
|
+
my_key = MAPI_KEY.data
|
|
32
45
|
return my_key
|
|
33
46
|
#---------------------------------------------------------------------------------------------------------------
|
|
34
47
|
|
|
@@ -10,6 +10,8 @@ from ._section import *
|
|
|
10
10
|
from ._material import *
|
|
11
11
|
from ._thickness import *
|
|
12
12
|
|
|
13
|
+
from ._tendon import *
|
|
14
|
+
|
|
13
15
|
class Model:
|
|
14
16
|
|
|
15
17
|
#4 Function to check analysis status & perform analysis if not analyzed
|
|
@@ -238,6 +240,7 @@ class Model:
|
|
|
238
240
|
Group.create()
|
|
239
241
|
Boundary.create()
|
|
240
242
|
Load.create()
|
|
243
|
+
Tendon.create()
|
|
241
244
|
|
|
242
245
|
|
|
243
246
|
|