midas-civil 0.1.5__py3-none-any.whl → 0.1.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/_section.py CHANGED
@@ -732,8 +732,142 @@ class Section:
732
732
  _SectionADD(self)
733
733
 
734
734
 
735
+ #=======================================================Tapered Group===========================================
735
736
 
736
-
737
+ class TaperedGroup:
738
+
739
+ data = []
740
+
741
+ def __init__(self, name, elem_list, z_var, y_var, z_exp=None, z_from=None, z_dist=None,
742
+ y_exp=None, y_from=None, y_dist=None, id=""):
743
+ """
744
+ Args:
745
+ name (str): Tapered Group Name (Required).
746
+ elem_list (list): List of element numbers (Required).
747
+ z_var (str): Section shape variation for Z-axis: "LINEAR" or "POLY" (Required).
748
+ y_var (str): Section shape variation for Y-axis: "LINEAR" or "POLY" (Required).
749
+ z_exp (float, optional): Z-axis exponent. Required if z_var is "POLY".
750
+ z_from (str, optional): Z-axis symmetric plane ("i" or "j"). Defaults to "i" for "POLY".
751
+ z_dist (float, optional): Z-axis symmetric plane distance. Defaults to 0 for "POLY".
752
+ y_exp (float, optional): Y-axis exponent. Required if y_var is "POLY".
753
+ y_from (str, optional): Y-axis symmetric plane ("i" or "j"). Defaults to "i" for "POLY".
754
+ y_dist (float, optional): Y-axis symmetric plane distance. Defaults to 0 for "POLY".
755
+ id (str, optional): ID for the tapered group. Auto-generated if not provided.
737
756
 
738
-
739
-
757
+ Example:
758
+ Section.TapperGroup("Linear", [1, 2, 3], "LINEAR", "LINEAR")
759
+ Section.TapperGroup("ZPoly", [4, 5], "POLY", "LINEAR", z_exp=2.5)
760
+ """
761
+ self.NAME = name
762
+ self.ELEM_LIST = elem_list
763
+ self.Z_VAR = z_var
764
+ self.Y_VAR = y_var
765
+
766
+ # Z-axis parameters (only for POLY)
767
+ if z_var == "POLY":
768
+ if z_exp is None:
769
+ raise ValueError("z_exp is required when z_var is 'POLY'")
770
+ self.Z_EXP = z_exp
771
+ self.Z_FROM = z_from if z_from is not None else "i"
772
+ self.Z_DIST = z_dist if z_dist is not None else 0
773
+ else:
774
+ self.Z_EXP = None
775
+ self.Z_FROM = None
776
+ self.Z_DIST = None
777
+
778
+ # Y-axis parameters (only for POLY)
779
+ if y_var == "POLY":
780
+ if y_exp is None:
781
+ raise ValueError("y_exp is required when y_var is 'POLY'")
782
+ self.Y_EXP = y_exp
783
+ self.Y_FROM = y_from if y_from is not None else "i"
784
+ self.Y_DIST = y_dist if y_dist is not None else 0
785
+ else:
786
+ self.Y_EXP = None
787
+ self.Y_FROM = None
788
+ self.Y_DIST = None
789
+
790
+ if id == "":
791
+ id = len(Section.TaperedGroup.data) + 1
792
+ self.ID = id
793
+
794
+ Section.TaperedGroup.data.append(self)
795
+
796
+ @classmethod
797
+ def json(cls):
798
+ json_data = {"Assign": {}}
799
+ for i in cls.data:
800
+ # Base data that's always included
801
+ tapper_data = {
802
+ "NAME": i.NAME,
803
+ "ELEMLIST": i.ELEM_LIST,
804
+ "ZVAR": i.Z_VAR,
805
+ "YVAR": i.Y_VAR
806
+ }
807
+
808
+ # Add Z-axis polynomial parameters only if Z_VAR is "POLY"
809
+ if i.Z_VAR == "POLY":
810
+ tapper_data["ZEXP"] = i.Z_EXP
811
+ tapper_data["ZFROM"] = i.Z_FROM
812
+ tapper_data["ZDIST"] = i.Z_DIST
813
+
814
+ # Add Y-axis polynomial parameters only if Y_VAR is "POLY"
815
+ if i.Y_VAR == "POLY":
816
+ tapper_data["YEXP"] = i.Y_EXP
817
+ tapper_data["YFROM"] = i.Y_FROM
818
+ tapper_data["YDIST"] = i.Y_DIST
819
+
820
+ json_data["Assign"][str(i.ID)] = tapper_data
821
+
822
+ return json_data
823
+
824
+ @classmethod
825
+ def create(cls):
826
+ MidasAPI("PUT", "/db/tsgr", cls.json())
827
+
828
+ @classmethod
829
+ def get(cls):
830
+ return MidasAPI("GET", "/db/tsgr")
831
+
832
+ @classmethod
833
+ def delete(cls):
834
+ cls.data = []
835
+ return MidasAPI("DELETE", "/db/tsgr")
836
+
837
+ @classmethod
838
+ def sync(cls):
839
+ cls.data = []
840
+ response = cls.get()
841
+
842
+ if response and response != {'message': ''}:
843
+ tsgr_data = response.get('TSGR', {})
844
+ # Iterate through the dictionary of tapered groups from the API response
845
+ for tsgr_id, item_data in tsgr_data.items():
846
+ # Extract base parameters
847
+ name = item_data.get('NAME')
848
+ elem_list = item_data.get('ELEMLIST')
849
+ z_var = item_data.get('ZVAR')
850
+ y_var = item_data.get('YVAR')
851
+
852
+ # Extract optional parameters based on variation type
853
+ z_exp = item_data.get('ZEXP') if z_var == "POLY" else None
854
+ z_from = item_data.get('ZFROM') if z_var == "POLY" else None
855
+ z_dist = item_data.get('ZDIST') if z_var == "POLY" else None
856
+
857
+ y_exp = item_data.get('YEXP') if y_var == "POLY" else None
858
+ y_from = item_data.get('YFROM') if y_var == "POLY" else None
859
+ y_dist = item_data.get('YDIST') if y_var == "POLY" else None
860
+
861
+ Section.TaperedGroup(
862
+ name=name,
863
+ elem_list=elem_list,
864
+ z_var=z_var,
865
+ y_var=y_var,
866
+ z_exp=z_exp,
867
+ z_from=z_from,
868
+ z_dist=z_dist,
869
+ y_exp=y_exp,
870
+ y_from=y_from,
871
+ y_dist=y_dist,
872
+ id=tsgr_id
873
+ )
@@ -1,6 +1,7 @@
1
1
  from ._mapi import *
2
2
  from ._node import *
3
3
  from ._group import *
4
+ from ._load import *
4
5
 
5
6
  def convList(item):
6
7
  if type(item) != list:
@@ -57,6 +58,11 @@ class Temperature:
57
58
  temps = []
58
59
 
59
60
  def __init__(self, temperature, lcname, group="", id=None):
61
+ chk = 0
62
+ for i in Load_Case.cases:
63
+ if lcname in i.NAME: chk = 1
64
+ if chk == 0: Load_Case("T", lcname)
65
+
60
66
  if group:
61
67
  chk = 0
62
68
  try:
@@ -143,6 +149,12 @@ class Temperature:
143
149
  temps = []
144
150
 
145
151
  def __init__(self, element, temperature, lcname, group="", id=None):
152
+
153
+ chk = 0
154
+ for i in Load_Case.cases:
155
+ if lcname in i.NAME: chk = 1
156
+ if chk == 0: Load_Case("T", lcname)
157
+
146
158
  if group:
147
159
  chk = 0
148
160
  try:
@@ -256,6 +268,12 @@ class Temperature:
256
268
  temps = []
257
269
 
258
270
  def __init__(self, element, type, lcname, tz, group="", id=None, hz=None, ty=0, hy=None):
271
+
272
+ chk = 0
273
+ for i in Load_Case.cases:
274
+ if lcname in i.NAME: chk = 1
275
+ if chk == 0: Load_Case("T", lcname)
276
+
259
277
  if group:
260
278
  chk = 0
261
279
  try:
@@ -376,6 +394,12 @@ class Temperature:
376
394
  temps = []
377
395
 
378
396
  def __init__(self, node, temperature, lcname, group="", id=None):
397
+
398
+ chk = 0
399
+ for i in Load_Case.cases:
400
+ if lcname in i.NAME: chk = 1
401
+ if chk == 0: Load_Case("T", lcname)
402
+
379
403
  if group:
380
404
  chk = 0
381
405
  try:
@@ -500,6 +524,12 @@ class Temperature:
500
524
  raise ValueError("For 'Input' type, both 'elast' and 'thermal' parameters are required.")
501
525
 
502
526
  # Handle load group creation
527
+
528
+ chk = 0
529
+ for i in Load_Case.cases:
530
+ if lcname in i.NAME: chk = 1
531
+ if chk == 0: Load_Case("T", lcname)
532
+
503
533
  if group:
504
534
  chk = 0
505
535
  try:
midas_civil/_tendon.py CHANGED
@@ -668,6 +668,7 @@ class Tendon:
668
668
  self.R = R_spline3d
669
669
  self.RADIUS = R_round3d
670
670
 
671
+
671
672
 
672
673
  #----- 2D Profile Spline (only)-------------
673
674
  xy_loc = []
@@ -703,7 +704,25 @@ class Tendon:
703
704
  Tendon.Profile.profiles.append(self)
704
705
  Tendon.Profile.ids.append(self.ID)
705
706
 
707
+ def update_profile(self,points_xyz):
708
+ xyz_loc = []
709
+ bFix = []
710
+ R_spline3d = []
711
+ R_round3d = []
706
712
 
713
+ for point in points_xyz:
714
+ xyz_loc.append(_POINT_(point[0],point[1],point[2]))
715
+ bFix.append(False) # Default not defining here
716
+ R_spline3d.append([0,0]) # Default not defining here
717
+
718
+ self.P_XYZ = xyz_loc
719
+ self.INPUT = '3D'
720
+ self.CURVE = 'SPLINE'
721
+ self.SHAPE = 'STRAIGHT'
722
+
723
+ self.bFIX = bFix
724
+ self.R = R_spline3d
725
+ self.RADIUS = R_round3d
707
726
 
708
727
  @classmethod
709
728
  def json(cls):
midas_civil/_view.py CHANGED
@@ -6,6 +6,11 @@ from ._model import *
6
6
  class View:
7
7
 
8
8
  def Capture(location="D:\\API_temp\\img3.jpg",img_w = 1280 , img_h = 720,view='',stage:str=''):
9
+ ''' Location - image location
10
+ Image height and width
11
+ View - 'pre' or 'post'
12
+ stage - CS name
13
+ '''
9
14
  json_body = {
10
15
  "Argument": {
11
16
  "EXPORT_PATH": location,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: midas_civil
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Python library for MIDAS Civil NX
5
5
  Author: Sumit Shekhar
6
6
  Author-email: sumit.midasit@gmail.com
@@ -0,0 +1,27 @@
1
+ midas_civil/__init__.py,sha256=t0XkmZiEBYodUkU2gJWLQmqrpQdZc8ikPM3Z0xrSVPg,575
2
+ midas_civil/_boundary.py,sha256=s5mgZIc1b0-P7AdWuaPAQ5cIbHL5CR1YRKJA7KE4W_U,32958
3
+ midas_civil/_construction.py,sha256=S8UosWTfVXLI5MmfULqsYw-Z9K5lQ5_34hvxZFVMlMM,40687
4
+ midas_civil/_construction_backup.py,sha256=Pj7V-NYCkkT-aMjKXfs1jKa9klsGh48UXDLwn3BLYTY,18225
5
+ midas_civil/_element.py,sha256=4IjJSlsXMr2llv7gC66KBxPoikt9rWbwGBePMaH9gYg,26935
6
+ midas_civil/_group.py,sha256=9EsPGW8lWpzJBW25Gfd-G5S_9oP8ER3zNzeqknDsfmw,11480
7
+ midas_civil/_load.py,sha256=kPDcgyd-D_HD59ABQuYmry92ruCovdYos65g06wMq84,30360
8
+ midas_civil/_mapi.py,sha256=8ySOgle7bQT6GF-4AHEEopq7OAf-rA1SgmkMiVFdMF0,4478
9
+ midas_civil/_material.py,sha256=uJEIHJM9OhwTRWUI2mtd_0BQSxdlYhATYJu9P7tNNBA,69511
10
+ midas_civil/_model.py,sha256=G5Kh7u2DSodvKGQ0fOzAUx4Ilj8-rn-nGDTFeI6AkUU,16442
11
+ midas_civil/_movingload.py,sha256=_XgERsk5tkTx4u1vhe23kdz0xNr41X2tRaiyNaFNt84,79999
12
+ midas_civil/_node.py,sha256=wRttDbebQWT6aZWeNd72AgzVWUETyNzMng5kJQmV3WM,4760
13
+ midas_civil/_result copy.py,sha256=siTMENLIwF_6rvydSjP9aQAWaIlt0pReiqNyDhDevGk,24290
14
+ midas_civil/_result.py,sha256=ZJf2CQG2ZjlTKuWo3zBnG7W8EwI1UkhWhWJVWRzlXUU,7640
15
+ midas_civil/_result_extract.py,sha256=J-9eeWDbFeaDL-C41TAynYuooiHYsayAe3WbfGRO8sM,5537
16
+ midas_civil/_section.py,sha256=zhUkiIaRI9DqYHAdpmQvhFpg6SuTgAM7xPEz-3Wingg,32390
17
+ midas_civil/_settlement.py,sha256=U7lJYBqGbuCv7qziEEznDyA4M_SCjJeIjc0lDeGfE4Y,5125
18
+ midas_civil/_temperature.py,sha256=EfvivFWfxyM8yFCvWJgXLhaCofGwLKEBGFUuW8yHnfQ,24209
19
+ midas_civil/_tendon.py,sha256=qfkcRAZ8MKe36xCec4Nr5TQ17_zDCk2TMW4T5lc85e0,33308
20
+ midas_civil/_thickness.py,sha256=4xQsLA3Q_gIGCwLc_glFmiErdWdQUSwhlEhJ_IPJseA,3248
21
+ midas_civil/_utils.py,sha256=eymiqO8KaTKdhVY3saebqNS0BbUUmGmgw3-ELKqew0A,2611
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,,
@@ -1,27 +0,0 @@
1
- midas_civil/__init__.py,sha256=8kl0ZFsGAlXwo7afdLe6XfDq8th42f-jNeGI1p1x7Zc,573
2
- midas_civil/_boundary.py,sha256=zXoVbZfvWnCIrSdN1lvUAj7cgzxzY3-U1-3ejVzwFfE,32701
3
- midas_civil/_construction.py,sha256=EqpJ46w4dqtlmk8dy9ChQq2cF-R2duXcgmpJy4cWLz0,19965
4
- midas_civil/_construction_backup.py,sha256=Pj7V-NYCkkT-aMjKXfs1jKa9klsGh48UXDLwn3BLYTY,18225
5
- midas_civil/_element.py,sha256=9-JFrh3wyH4zhTBq7ldaIYbteuDRdq-qsUH9o8BnATs,19876
6
- midas_civil/_group.py,sha256=QpZFt0CnPGO_GHp496oiYjga-5mMtcCSZed75PiNIj0,11342
7
- midas_civil/_load.py,sha256=Wg2Cyn7meaCkb28vQSxWi1H1slBQKXdXyoKPGvsHesQ,29557
8
- midas_civil/_mapi.py,sha256=oYYfWe3FIFWlMZEpuiIMJQhl42l1rzz2M1rY8-4DQ94,2930
9
- midas_civil/_material.py,sha256=uJEIHJM9OhwTRWUI2mtd_0BQSxdlYhATYJu9P7tNNBA,69511
10
- midas_civil/_model.py,sha256=t8wcnu6XlbZ0rFE79jCXuP8mI7Fvpi5mbsXNiRUzpIg,16385
11
- midas_civil/_movingload.py,sha256=_XgERsk5tkTx4u1vhe23kdz0xNr41X2tRaiyNaFNt84,79999
12
- midas_civil/_node.py,sha256=mwKywpDXBLW22oVA3p1fkIWR1mCyE0MRiLi3cERlIqg,4411
13
- midas_civil/_result copy.py,sha256=siTMENLIwF_6rvydSjP9aQAWaIlt0pReiqNyDhDevGk,24290
14
- midas_civil/_result.py,sha256=oRVNbbtAwz_8s4zD0UcL7vi6bs6xHHr3SsTgerZNDAY,7638
15
- midas_civil/_result_extract.py,sha256=J-9eeWDbFeaDL-C41TAynYuooiHYsayAe3WbfGRO8sM,5537
16
- midas_civil/_section.py,sha256=56RWJdyvDr7Es7Is8Fxq3jPCPP57WW8ECCYZzhm6bf0,26375
17
- midas_civil/_settlement.py,sha256=U7lJYBqGbuCv7qziEEznDyA4M_SCjJeIjc0lDeGfE4Y,5125
18
- midas_civil/_temperature.py,sha256=KDY_gG5PZ3SvTk824Z7LD3Ku856RKzkw3p_Zy-cp30c,23400
19
- midas_civil/_tendon.py,sha256=xMZRPbE3CcYG6OgkfUCslHd2pzUte2grQ9XREH9jcQc,32677
20
- midas_civil/_thickness.py,sha256=4xQsLA3Q_gIGCwLc_glFmiErdWdQUSwhlEhJ_IPJseA,3248
21
- midas_civil/_utils.py,sha256=eymiqO8KaTKdhVY3saebqNS0BbUUmGmgw3-ELKqew0A,2611
22
- midas_civil/_view.py,sha256=68gfsyN6QJ2B5CopNVlP3MQ-833MxfrVWz7p_hMdm4c,701
23
- midas_civil-0.1.5.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
24
- midas_civil-0.1.5.dist-info/METADATA,sha256=R8p-c_trOMCbZgDbim6cDUfw1HbJ3AuOi5UpSecNfXQ,1709
25
- midas_civil-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- midas_civil-0.1.5.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
27
- midas_civil-0.1.5.dist-info/RECORD,,