midas-civil 0.0.6__py3-none-any.whl → 0.0.7__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 +83 -0
- midas_civil/_mapi.py +7 -0
- {midas_civil-0.0.6.dist-info → midas_civil-0.0.7.dist-info}/METADATA +1 -1
- {midas_civil-0.0.6.dist-info → midas_civil-0.0.7.dist-info}/RECORD +7 -7
- {midas_civil-0.0.6.dist-info → midas_civil-0.0.7.dist-info}/WHEEL +0 -0
- {midas_civil-0.0.6.dist-info → midas_civil-0.0.7.dist-info}/licenses/LICENSE +0 -0
- {midas_civil-0.0.6.dist-info → midas_civil-0.0.7.dist-info}/top_level.txt +0 -0
midas_civil/_boundary.py
CHANGED
|
@@ -10,6 +10,8 @@ def convList(item):
|
|
|
10
10
|
return item
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
|
|
14
|
+
|
|
13
15
|
class Boundary:
|
|
14
16
|
|
|
15
17
|
@classmethod
|
|
@@ -502,3 +504,84 @@ class Boundary:
|
|
|
502
504
|
cls.links = []
|
|
503
505
|
return MidasAPI("DELETE", "/db/RIGD")
|
|
504
506
|
#---------------------------------------------------------------------------------------------------------------
|
|
507
|
+
|
|
508
|
+
class MLFC:
|
|
509
|
+
func = []
|
|
510
|
+
_id = []
|
|
511
|
+
|
|
512
|
+
def __init__(self,name,type:str='FORCE',symm:bool=True,data:list=[[0,0],[1,1]],id=None):
|
|
513
|
+
self.NAME = name
|
|
514
|
+
self.TYPE = type
|
|
515
|
+
self.SYMM = symm
|
|
516
|
+
self.DATA = data
|
|
517
|
+
|
|
518
|
+
self.X = [dat[0] for dat in self.DATA]
|
|
519
|
+
self.Y = [dat[1] for dat in self.DATA]
|
|
520
|
+
|
|
521
|
+
# Auto-assign ID if not provided
|
|
522
|
+
if id is None:
|
|
523
|
+
if __class__._id == []:
|
|
524
|
+
self.ID = 1
|
|
525
|
+
else:
|
|
526
|
+
self.ID = max(__class__._id) + 1
|
|
527
|
+
else:
|
|
528
|
+
self.ID = id
|
|
529
|
+
|
|
530
|
+
__class__._id.append(self.ID)
|
|
531
|
+
__class__.func.append(self)
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
@classmethod
|
|
536
|
+
def json(cls):
|
|
537
|
+
json = {"Assign": {}}
|
|
538
|
+
for fn in cls.func:
|
|
539
|
+
json["Assign"][fn.ID]={
|
|
540
|
+
"NAME": fn.NAME,
|
|
541
|
+
"TYPE": fn.TYPE,
|
|
542
|
+
"SYMM": fn.SYMM,
|
|
543
|
+
"FUNC_ID": 0,
|
|
544
|
+
"ITEMS": []
|
|
545
|
+
}
|
|
546
|
+
for i in range(len(fn.X)):
|
|
547
|
+
json["Assign"][fn.ID]["ITEMS"].append({"X":fn.X[i],"Y":fn.Y[i]})
|
|
548
|
+
return json
|
|
549
|
+
|
|
550
|
+
@classmethod
|
|
551
|
+
def create(cls):
|
|
552
|
+
"""
|
|
553
|
+
Sends all FUNC data to Midas API.
|
|
554
|
+
"""
|
|
555
|
+
MidasAPI("PUT", "/db/MLFC", cls.json())
|
|
556
|
+
|
|
557
|
+
@classmethod
|
|
558
|
+
def get(cls):
|
|
559
|
+
"""
|
|
560
|
+
Retrieves data from Midas API.
|
|
561
|
+
"""
|
|
562
|
+
return MidasAPI("GET", "/db/MLFC")
|
|
563
|
+
|
|
564
|
+
@classmethod
|
|
565
|
+
def sync(cls):
|
|
566
|
+
"""
|
|
567
|
+
Updates the class with data from the Midas API.
|
|
568
|
+
"""
|
|
569
|
+
cls.links = []
|
|
570
|
+
a = cls.get()
|
|
571
|
+
if a != {'message': ''}:
|
|
572
|
+
for i in a['MLFC'].keys():
|
|
573
|
+
name = a['MLFC'][i]["NAME"]
|
|
574
|
+
type = a['MLFC'][i]["TYPE"]
|
|
575
|
+
symm = a['MLFC'][i]["SYMM"]
|
|
576
|
+
data = []
|
|
577
|
+
for j in (a['MLFC'][i]['ITEMS']):
|
|
578
|
+
data.append([j["X"],j["Y"]])
|
|
579
|
+
Boundary.MLFC(name,type,symm,data,int(i))
|
|
580
|
+
|
|
581
|
+
@classmethod
|
|
582
|
+
def delete(cls):
|
|
583
|
+
"""
|
|
584
|
+
Deletes all func from the database and resets the class.
|
|
585
|
+
"""
|
|
586
|
+
cls.links = []
|
|
587
|
+
return MidasAPI("DELETE", "/db/MLFC")
|
midas_civil/_mapi.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
import sys
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
def Midas_help():
|
|
6
|
+
"""MIDAS Documnetation : https://midas-rnd.github.io/midasapi-python """
|
|
7
|
+
print("---"*22)
|
|
8
|
+
print("| HELP MANUAL : https://midas-rnd.github.io/midasapi-python/ |")
|
|
9
|
+
print("---"*22,"\n")
|
|
10
|
+
|
|
4
11
|
class MAPI_PRODUCT:
|
|
5
12
|
product = "civil"
|
|
6
13
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
midas_civil/__init__.py,sha256=mq1dqMgS92chPxRbKzoA7X33jpgz5y-8a_CpBvQUmJI,510
|
|
2
|
-
midas_civil/_boundary.py,sha256=
|
|
2
|
+
midas_civil/_boundary.py,sha256=hxeqZLfM52UhwxamQp3UoO3oBvlzMXusHqLffz41f8M,21587
|
|
3
3
|
midas_civil/_construction.py,sha256=Pj7V-NYCkkT-aMjKXfs1jKa9klsGh48UXDLwn3BLYTY,18225
|
|
4
4
|
midas_civil/_element.py,sha256=RyuJN2XMCrZoBBJ5a0CDbRISocPL0WyuQvYdKes6vMc,7237
|
|
5
5
|
midas_civil/_group.py,sha256=8iZCIB6XEgFz4Z7QEDU3wd7t18xAtNnqetw5Ch1UOeY,10074
|
|
6
6
|
midas_civil/_load.py,sha256=__qVQgbyfAILyoLv8eDGZ_1uMunzzDG1tUu5zWWD-oA,17213
|
|
7
|
-
midas_civil/_mapi.py,sha256=
|
|
7
|
+
midas_civil/_mapi.py,sha256=NImeBj8L7rwrYuaeXbaU3-UnCL4Fyp6tB1wf0UpdQp8,2354
|
|
8
8
|
midas_civil/_material.py,sha256=hlgBGL5JTN1-aDL5hXwU9lalAhzoD0pPP-8HE2jCfAs,10711
|
|
9
9
|
midas_civil/_model.py,sha256=wbf3gmFgv0ZB4rphxr-3xLspH-WD7p6aB7PQCNGHA40,14923
|
|
10
10
|
midas_civil/_node.py,sha256=yj17RT3Ei7RafWQVHThjwPGUHe3DTQbuv0MwuDjCJro,3513
|
|
@@ -13,8 +13,8 @@ midas_civil/_result_extract.py,sha256=nYR3cYYZVogVje-Y4Y1Lh1S-lCDs_n-1MCwvkmWk6q
|
|
|
13
13
|
midas_civil/_section.py,sha256=56RWJdyvDr7Es7Is8Fxq3jPCPP57WW8ECCYZzhm6bf0,26375
|
|
14
14
|
midas_civil/_thickness.py,sha256=Mungooyfo0_JJUmjPCr25h0PSSW_TtEfcMa-hz3YGZA,3146
|
|
15
15
|
midas_civil/_utils.py,sha256=eymiqO8KaTKdhVY3saebqNS0BbUUmGmgw3-ELKqew0A,2611
|
|
16
|
-
midas_civil-0.0.
|
|
17
|
-
midas_civil-0.0.
|
|
18
|
-
midas_civil-0.0.
|
|
19
|
-
midas_civil-0.0.
|
|
20
|
-
midas_civil-0.0.
|
|
16
|
+
midas_civil-0.0.7.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
|
|
17
|
+
midas_civil-0.0.7.dist-info/METADATA,sha256=TTnuBR1eAQIqtW9q4kLBY0o6_AYWTycQ46qBs6LMORI,1709
|
|
18
|
+
midas_civil-0.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
midas_civil-0.0.7.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
|
|
20
|
+
midas_civil-0.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|