midas-civil 0.1.7__py3-none-any.whl → 0.1.9__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.

@@ -659,7 +659,7 @@ class CS:
659
659
 
660
660
  #-----------------------------------------------------------------------------------------------------------------------------------
661
661
 
662
- class TimeLoads:
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.TimeLoads(10, 35, "DL")
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.TimeLoads.timeloads) + 1
691
+ self.ID = len(CS.TimeLoad.timeloads) + 1
692
692
  else:
693
693
  self.ID = id
694
694
 
695
- CS.TimeLoads.timeloads.append(self)
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.TimeLoads.json()
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 database"""
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 database"""
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 TimeLoads class with data from the database"""
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 TimeLoads object
754
- new_timeload = CS.TimeLoads(
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.TimeLoads.timeloads.pop()
763
- CS.TimeLoads.timeloads.append(new_timeload)
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 database and resets the class"""
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/_mapi.py CHANGED
@@ -18,13 +18,13 @@ class MAPI_COUNTRY:
18
18
  def __init__(self,country:str):
19
19
  ''' Define Civil NX country to automatically set Base URL and MAPI Key from registry.
20
20
  ```
21
- MAPI_COUNTRY('US')
22
- MAPI_COUNTRY('CN')
23
-
21
+ MAPI_COUNTRY('US') # For english version
22
+ MAPI_COUNTRY('KR') # For Korean version
23
+ MAPI_COUNTRY('CN') # For Chinese version
24
24
  ```
25
25
  '''
26
- if country.lower() == 'cn':
27
- MAPI_COUNTRY.country = 'CN'
26
+ if country.lower() in ['us','cn','kr','jp']:
27
+ MAPI_COUNTRY.country = country.upper()
28
28
  else:
29
29
  MAPI_COUNTRY.country = 'US'
30
30
 
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
  Metadata-Version: 2.4
2
2
  Name: midas_civil
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Summary: Python library for MIDAS Civil NX
5
5
  Author: Sumit Shekhar
6
6
  Author-email: sumit.midasit@gmail.com
@@ -1,11 +1,11 @@
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=S8UosWTfVXLI5MmfULqsYw-Z9K5lQ5_34hvxZFVMlMM,40687
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
7
7
  midas_civil/_load.py,sha256=kPDcgyd-D_HD59ABQuYmry92ruCovdYos65g06wMq84,30360
8
- midas_civil/_mapi.py,sha256=8ySOgle7bQT6GF-4AHEEopq7OAf-rA1SgmkMiVFdMF0,4478
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
11
  midas_civil/_movingload.py,sha256=_XgERsk5tkTx4u1vhe23kdz0xNr41X2tRaiyNaFNt84,79999
@@ -16,12 +16,12 @@ midas_civil/_result_extract.py,sha256=J-9eeWDbFeaDL-C41TAynYuooiHYsayAe3WbfGRO8s
16
16
  midas_civil/_section.py,sha256=zhUkiIaRI9DqYHAdpmQvhFpg6SuTgAM7xPEz-3Wingg,32390
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=qfkcRAZ8MKe36xCec4Nr5TQ17_zDCk2TMW4T5lc85e0,33308
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.1.7.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
24
- midas_civil-0.1.7.dist-info/METADATA,sha256=Xiw3pfQBv6eGHxaOb-vlvCNzd1tDoW0Ak8qfZYYX8kI,1709
25
- midas_civil-0.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- midas_civil-0.1.7.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
27
- midas_civil-0.1.7.dist-info/RECORD,,
23
+ midas_civil-0.1.9.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
24
+ midas_civil-0.1.9.dist-info/METADATA,sha256=tLv6M1N1mI_bQMNYajxZRpvbSb8Z58rJ4S2Mp-6OvRA,1709
25
+ midas_civil-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ midas_civil-0.1.9.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
27
+ midas_civil-0.1.9.dist-info/RECORD,,