midas-civil 1.1.0__tar.gz → 1.1.1__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.

Files changed (43) hide show
  1. {midas_civil-1.1.0 → midas_civil-1.1.1}/PKG-INFO +1 -1
  2. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/__init__.py +1 -1
  3. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_element.py +69 -18
  4. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_load.py +70 -2
  5. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_mapi.py +50 -12
  6. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_model.py +1 -0
  7. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_result_extract.py +1 -0
  8. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/_TapdbSecSS.py +1 -1
  9. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/__init__.py +2 -2
  10. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/_dbSecSS.py +7 -7
  11. midas_civil-1.1.0/midas_civil/_section/_pscSS.py → midas_civil-1.1.1/midas_civil/_section/_pscSS copy.py +1 -1
  12. midas_civil-1.1.1/midas_civil/_section/_pscSS.py +762 -0
  13. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_utils.py +4 -1
  14. midas_civil-1.1.1/midas_civil/_view.py +266 -0
  15. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil.egg-info/PKG-INFO +1 -1
  16. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil.egg-info/SOURCES.txt +1 -0
  17. {midas_civil-1.1.0 → midas_civil-1.1.1}/setup.py +1 -1
  18. midas_civil-1.1.0/midas_civil/_view.py +0 -31
  19. {midas_civil-1.1.0 → midas_civil-1.1.1}/LICENSE +0 -0
  20. {midas_civil-1.1.0 → midas_civil-1.1.1}/README.md +0 -0
  21. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_BoundaryChangeAssignment.py +0 -0
  22. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_analysiscontrol.py +0 -0
  23. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_boundary.py +0 -0
  24. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_construction.py +0 -0
  25. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_construction_backup.py +0 -0
  26. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_group.py +0 -0
  27. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_material.py +0 -0
  28. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_movingload.py +0 -0
  29. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_node.py +0 -0
  30. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_result copy.py +0 -0
  31. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_result.py +0 -0
  32. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/_compositeSS.py +0 -0
  33. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/_offsetSS.py +0 -0
  34. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/_tapPSC1CellSS.py +0 -0
  35. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_section/_unSupp.py +0 -0
  36. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_settlement.py +0 -0
  37. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_temperature.py +0 -0
  38. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_tendon.py +0 -0
  39. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil/_thickness.py +0 -0
  40. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil.egg-info/dependency_links.txt +0 -0
  41. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil.egg-info/requires.txt +0 -0
  42. {midas_civil-1.1.0 → midas_civil-1.1.1}/midas_civil.egg-info/top_level.txt +0 -0
  43. {midas_civil-1.1.0 → midas_civil-1.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: midas_civil
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Python library for MIDAS Civil NX
5
5
  Home-page: https://github.com/MIDASIT-Co-Ltd/midas-civil-python
6
6
  Author: Sumit Shekhar
@@ -1,7 +1,7 @@
1
1
  import requests
2
2
  from colorama import Fore,Style
3
3
  from ._mapi import *
4
- _version_ = "1.1.0"
4
+ _version_ = "1.1.1"
5
5
 
6
6
 
7
7
  print('\n╭────────────────────────────────────────────────────────────────────────────────────╮')
@@ -3,10 +3,37 @@ from ._node import *
3
3
  from ._group import _add_elem_2_stGroup
4
4
  from ._group import _add_node_2_stGroup,Group
5
5
  import numpy as np
6
- from scipy.interpolate import splev, splprep
6
+ from scipy.interpolate import splev, splprep , interp1d , Akima1DInterpolator
7
7
  from math import hypot
8
8
  import math
9
+ from ._utils import _convItem2List
9
10
 
11
+ def _SInterp(angle,num_points):
12
+ ''' Angle -> Input list | Num Points -> Output length'''
13
+
14
+ angle = _convItem2List(angle)
15
+ if len(angle) == 1 :
16
+ angle.append(angle[0])
17
+ angle.append(angle[0])
18
+ if len(angle) == 2 :
19
+ angle.append(angle[-1])
20
+ angle[1] = (angle[0]+angle[2])*0.5
21
+
22
+ num_angle = len(angle)
23
+ angle_intrp_x = [0]
24
+ angle_intrp_y = [angle[0]]
25
+ for a in range(num_angle-1):
26
+ angle_intrp_x.append((a+1)*(num_points-1)/(num_angle-1))
27
+ angle_intrp_y.append(angle[a+1])
28
+
29
+ _alignment = Akima1DInterpolator(angle_intrp_x, angle_intrp_y,method='makima')
30
+ angle_intrp_func = interp1d(angle_intrp_x, angle_intrp_y)
31
+
32
+ angle_intrp_finalY = []
33
+ for i in range(num_points):
34
+ angle_intrp_finalY.append(_alignment(i))
35
+
36
+ return angle_intrp_finalY
10
37
 
11
38
  def _interpolateAlignment(pointsArray,n_seg=10,deg=1,mSize=0,includePoint:bool=True) -> list:
12
39
  ''' Returns point list and beta angle list'''
@@ -146,6 +173,8 @@ def _pointOffset(pts,yEcc=0,zEcc=0,angle=0):
146
173
  from ._utils import _matchArray
147
174
 
148
175
  angle2 = _matchArray(pts,angle)
176
+ yEcc2 = _matchArray(pts,yEcc)
177
+ zEcc2 = _matchArray(pts,zEcc)
149
178
 
150
179
  norm = []
151
180
  norm.append(_calcVector(np.subtract(pts[1],pts[0]),angle2[0])) # first X- along vector
@@ -165,7 +194,7 @@ def _pointOffset(pts,yEcc=0,zEcc=0,angle=0):
165
194
 
166
195
  pt_new = []
167
196
  for i in range(len(pts)):
168
- pt_new.append(pts[i]+yEcc*norm[i][1]+zEcc*norm[i][2])
197
+ pt_new.append(pts[i]+yEcc2[i]*norm[i][1]+zEcc2[i]*norm[i][2])
169
198
 
170
199
  return pt_new
171
200
 
@@ -319,6 +348,10 @@ class Element:
319
348
  ids = []
320
349
  __elemDIC__ = {}
321
350
 
351
+
352
+ lastLoc = (0,0,0) #Last Location created using Beam element
353
+ '''Last Node Location created by Beam / Truss element - (x,y,z)'''
354
+
322
355
  @classmethod
323
356
  def json(cls):
324
357
  json_data = {"Assign": {}}
@@ -414,6 +447,8 @@ class Element:
414
447
  _norm2 = np.linalg.norm(_n2.AXIS ,axis=1,keepdims=True)
415
448
  _n2.AXIS = _n2.AXIS /_norm2
416
449
 
450
+ Element.lastLoc = (_n2.X,_n2.Y,_n2.Z)
451
+
417
452
  _ADD(self)
418
453
 
419
454
  @staticmethod
@@ -430,7 +465,7 @@ class Element:
430
465
  locc = s_locc+i*l*unit_vec/n
431
466
  Enode=Node(locc[0].item(),locc[1].item(),locc[2].item())
432
467
  beam_nodes.append(Enode.ID)
433
-
468
+ Element.lastLoc = (locc[0].item(),locc[1].item(),locc[2].item())
434
469
  for i in range(n):
435
470
  if id == 0 : id_new = 0
436
471
  else: id_new = id+i
@@ -452,7 +487,6 @@ class Element:
452
487
  for i in range(n+1):
453
488
  Enode=Node(i_loc[i][0].item(),i_loc[i][1].item(),i_loc[i][2].item())
454
489
  beam_nodes.append(Enode.ID)
455
-
456
490
  for i in range(n):
457
491
  if id == 0 : id_new = 0
458
492
  else: id_new = id+i
@@ -462,6 +496,9 @@ class Element:
462
496
 
463
497
  @staticmethod
464
498
  def PLine(points_loc:list,n_div:int=0,deg:int=1,includePoint:bool=True,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0,bLocalAxis=False):
499
+ '''
500
+ angle : float of list(float)
501
+ '''
465
502
 
466
503
  beam_nodes =[]
467
504
  beam_obj = []
@@ -470,23 +507,29 @@ class Element:
470
507
  else:
471
508
  i_loc = _interpolateAlignment(points_loc,n_div,deg,0,includePoint)
472
509
 
473
- from ._utils import _matchArray
474
- angle = _matchArray(i_loc,angle)
510
+ num_points = len(i_loc)
511
+ angle_intrp_finalY = _SInterp(angle,num_points-1) #Beta Angle to be applied to Elements So, n-1
475
512
 
476
513
  for i in i_loc:
477
514
  Enode=Node(i[0],i[1],i[2])
478
515
  beam_nodes.append(Enode.ID)
479
-
480
516
  for i in range(len(i_loc)-1):
481
517
  if id == 0 : id_new = 0
482
518
  else: id_new = id+i
483
- beam_obj.append(Element.Beam(beam_nodes[i],beam_nodes[i+1],mat,sect,angle[i],group,id_new,bLocalAxis))
519
+ beam_obj.append(Element.Beam(beam_nodes[i],beam_nodes[i+1],mat,sect,angle_intrp_finalY[i].item(),group,id_new,bLocalAxis))
484
520
 
485
521
  return beam_obj
486
522
 
487
523
  @staticmethod
488
- def PLine2(points_loc:list,n_div:int=0,deg:int=1,includePoint:bool=True,mat:int=1,sect:int=1,angle:float=0, group = "" , id: int = 0,bLocalAxis=False,yEcc=0,zEcc=0):
489
-
524
+ def PLine2(points_loc:list,n_div:int=0,deg:int=1,includePoint:bool=True,mat:int=1,sect:int=1,angle:list[float]=0, group = "" , id: int = 0,bLocalAxis=False,yEcc:list[float]=0,zEcc:list[float]=0,bAngleInEcc:bool=True):
525
+ '''
526
+ Creates a polyline with Eccentricity considering the beta angle provided
527
+ angle , yEcc , zEcc : float or list(float)
528
+ [0,10] -> Angle at start = 0 | Angle at end = 10
529
+ [0,10,0] -> Angle at start = 0 | Angle at mid = 10 | Angle at end = 0
530
+ Inbetween values are **MAKIMA 1D** interpolated. (not cubic)
531
+ '''
532
+ from ._utils import _matchArray
490
533
 
491
534
  beam_nodes =[]
492
535
  beam_obj = []
@@ -495,21 +538,27 @@ class Element:
495
538
  else:
496
539
  i_loc = _interpolateAlignment(points_loc,n_div,deg,0,includePoint)
497
540
 
498
- from ._utils import _matchArray
499
- angle = _matchArray(i_loc,angle)
541
+
542
+ num_points = len(i_loc)
543
+ if bAngleInEcc:
544
+ angle_intrp_Ecc = _SInterp(angle,num_points)
545
+ else:
546
+ angle_intrp_Ecc = _matchArray(i_loc,[0])
547
+ angle_intrp_finalY = _SInterp(angle,num_points-1) #Beta Angle to be applied to Elements So, n-1
548
+
549
+ yEcc_intrp = _SInterp(yEcc,num_points)
550
+ zEcc_intrp = _SInterp(zEcc,num_points)
500
551
 
501
- i_loc2 = _pointOffset(i_loc,yEcc,zEcc,angle)
552
+ i_loc2 = _pointOffset(i_loc,yEcc_intrp,zEcc_intrp,angle_intrp_Ecc)
502
553
  for i in i_loc2:
503
554
  Enode=Node(i[0],i[1],i[2])
504
555
  beam_nodes.append(Enode.ID)
505
-
506
-
507
556
 
508
557
 
509
558
  for i in range(len(i_loc2)-1):
510
559
  if id == 0 : id_new = 0
511
560
  else: id_new = id+i
512
- beam_obj.append(Element.Beam(beam_nodes[i],beam_nodes[i+1],mat,sect,angle[i],group,id_new,bLocalAxis))
561
+ beam_obj.append(Element.Beam(beam_nodes[i],beam_nodes[i+1],mat,sect,angle_intrp_finalY[i].item(),group,id_new,bLocalAxis))
513
562
 
514
563
  return beam_obj
515
564
 
@@ -546,7 +595,9 @@ class Element:
546
595
  self.NODE = [i, j]
547
596
  self.ANGLE = angle
548
597
  self._GROUP = group
549
- self.LENGTH = _nodeDIST(nodeByID(i),nodeByID(j))
598
+ _n2 = nodeByID(j)
599
+ self.LENGTH = _nodeDIST(nodeByID(i),_n2)
600
+ Element.lastLoc = (_n2.X,_n2.Y,_n2.Z)
550
601
  _ADD(self)
551
602
 
552
603
  @staticmethod
@@ -977,5 +1028,5 @@ def elemByID(elemID:int) -> Element:
977
1028
  try:
978
1029
  return (Element.__elemDIC__[str(elemID)])
979
1030
  except:
980
- print(f'There is no element with ID {elemID}')
1031
+ print(Fore.RED +f'There is no element with ID {elemID}'+Style.RESET_ALL)
981
1032
  return None
@@ -256,7 +256,7 @@ class Load:
256
256
  data = []
257
257
  def __init__(self, element, load_case: str, load_group: str = "", value: float=0, direction: str = "GZ",
258
258
  id = "", D = [0, 1, 0, 0], P = [0, 0, 0, 0], cmd = "BEAM", typ = "UNILOAD", use_ecc = False, use_proj = False,
259
- eccn_dir = "LZ", eccn_type = 1, ieccn = 0, jeccn = 0, adnl_h = False, adnl_h_i = 0, adnl_h_j = 0):
259
+ eccn_dir = "LY", eccn_type = 1, ieccn = 0, jeccn = 0, adnl_h = False, adnl_h_i = 0, adnl_h_j = 0):
260
260
  """
261
261
  element: Element Number
262
262
  load_case (str): Load case name
@@ -737,4 +737,72 @@ class Load:
737
737
  item['GROUP_NAME'],
738
738
  values,
739
739
  item['ID']
740
- )
740
+ )
741
+ class Line:
742
+ def __init__(self, element_ids, load_case: str, load_group: str = "", D = [0, 1, 0, 0], P = [0, 0, 0, 0], direction: str = "GZ",
743
+ id = "", typ = "CONLOAD", use_ecc = False, use_proj = False,
744
+ eccn_dir = "LY", eccn_type = 1, ieccn = 0, jeccn = 0, adnl_h = False, adnl_h_i = 0, adnl_h_j = 0) :
745
+
746
+ elem_IDS = []
747
+ elem_LEN = []
748
+
749
+ for eID in element_ids:
750
+ try:
751
+ elm_len = elemByID(eID).LENGTH
752
+ elem_IDS.append(eID)
753
+ elem_LEN.append(elm_len)
754
+ # print(f"ID = {eID} LEN = {elm_len}")
755
+ except: pass
756
+ cum_LEN = np.insert(np.cumsum(elem_LEN),0,0)
757
+
758
+
759
+ if typ == 'CONLOAD':
760
+ for i in range(len(D)):
761
+ for q in range(len(cum_LEN)):
762
+ if D[i] >= 0:
763
+ if D[i] < cum_LEN[q] :
764
+ # print(f'LOADING ELEMENT at {D[i]}m = {elem_IDS[q-1]}')
765
+ rel_loc = (D[i] - cum_LEN[q-1]) / elem_LEN[q-1]
766
+ # print(f"Relative location = {rel_loc}")
767
+ Load.Beam(element=elem_IDS[q-1],load_case=load_case,load_group=load_group,D=[rel_loc],P=[P[i]],direction=direction,
768
+ id = id, typ = "CONLOAD", use_ecc = use_ecc, use_proj = use_proj,
769
+ eccn_dir = eccn_dir, eccn_type = eccn_type, ieccn = ieccn, jeccn = jeccn, adnl_h = adnl_h, adnl_h_i = adnl_h_i, adnl_h_j = adnl_h_j)
770
+ break
771
+
772
+ if typ == 'UNILOAD':
773
+ D = D[:2]
774
+ P = P[:2]
775
+ elms_indx = []
776
+ for i in range(2):
777
+ for q in range(len(cum_LEN)):
778
+ if D[i] < cum_LEN[q] :
779
+ # print(f'LOADING ELEMENT at {D[i]}m = {elem_IDS[q-1]}')
780
+ elms_indx.append(q-1)
781
+ # rel_loc = (D[i] - cum_LEN[q-1]) / elem_LEN[q-1]
782
+ break
783
+ if len(elms_indx)==1: elms_indx.append(len(cum_LEN)-2)
784
+ # print(f"INDEXs = {elms_indx}")
785
+ # print("-"*10)
786
+ # print(f"INDEXs = {elms_indx}")
787
+ # print("-"*10)
788
+ if elms_indx != []:
789
+ for i in range(elms_indx[0],elms_indx[1]+1):
790
+
791
+ rel1 = (max(D[0],cum_LEN[i]) - cum_LEN[i]) / elem_LEN[i]
792
+ rel2 = (min(D[1],cum_LEN[i+1]) - cum_LEN[i]) / elem_LEN[i]
793
+
794
+ p1 = P[0]+(max(D[0],cum_LEN[i])-D[0])*(P[1]-P[0])/(D[1]-D[0])
795
+ p2 = P[0]+(min(D[1],cum_LEN[i+1])-D[0])*(P[1]-P[0])/(D[1]-D[0])
796
+ if rel2-rel1 == 0: continue
797
+
798
+
799
+ # print(f"Loading ELEM -> {elem_IDS[i]} , D1 = {rel1} , P1 = {p1} | D2 = {rel2} , P2 = {p2}")
800
+ # Load.Beam(elem_IDS[i],load_case,load_group,D=[rel1,rel2],P=[p1,p2],typ=typ,direction=direction)
801
+ Load.Beam(element=elem_IDS[i],load_case=load_case,load_group=load_group,D=[rel1,rel2],P=[p1,p2],direction=direction,
802
+ id = id, typ = "UNILOAD", use_ecc = use_ecc, use_proj = use_proj,
803
+ eccn_dir = eccn_dir, eccn_type = eccn_type, ieccn = ieccn, jeccn = jeccn, adnl_h = adnl_h, adnl_h_i = adnl_h_i, adnl_h_j = adnl_h_j)
804
+
805
+
806
+
807
+
808
+
@@ -4,7 +4,7 @@ from colorama import Fore, Style
4
4
  try:import winreg
5
5
  except: pass
6
6
  import time
7
-
7
+ import polars as pl
8
8
 
9
9
 
10
10
 
@@ -19,7 +19,36 @@ def Midas_help():
19
19
  class NX:
20
20
  version_check = True
21
21
  user_print = True
22
- debug_print = False
22
+ debug_request = False
23
+ debug_requestJSON = False
24
+ debug_response = False
25
+
26
+ _symbol_responseCode_ = {
27
+ "1" : "⌛",
28
+ "2" : "✅",
29
+ "3" : "⚠️",
30
+ "4" : "💀",
31
+ "5" : "💀"
32
+ }
33
+
34
+
35
+ @staticmethod
36
+ def JSToDF_Results(js_json):
37
+ res_json = {}
38
+
39
+ c=0
40
+ for heading in js_json["SS_Table"]["HEAD"]:
41
+ for dat in js_json["SS_Table"]["DATA"]:
42
+ try:
43
+ res_json[heading].append(dat[c])
44
+ except:
45
+ res_json[heading]=[]
46
+ res_json[heading].append(dat[c])
47
+
48
+ c+=1
49
+
50
+ res_df = pl.DataFrame(res_json)
51
+ return(res_df)
23
52
 
24
53
 
25
54
  class MAPI_COUNTRY:
@@ -125,6 +154,14 @@ def MidasAPI(method:str, command:str, body:dict={})->dict:
125
154
  "MAPI-Key": mapi_key
126
155
  }
127
156
 
157
+ if MAPI_KEY.count == 1:
158
+ MAPI_KEY.count =0
159
+ if NX.user_print:
160
+ _checkUSER()
161
+
162
+
163
+
164
+
128
165
  start_time = time.perf_counter()
129
166
 
130
167
 
@@ -140,22 +177,23 @@ def MidasAPI(method:str, command:str, body:dict={})->dict:
140
177
  end_time = time.perf_counter()
141
178
  elapsed_time = end_time - start_time
142
179
 
143
- if NX.debug_print:
144
- print(f"{method} | URL : {command} | STATUS : {response.status_code} | TIME : {elapsed_time:.4f} sec")
145
-
146
-
147
-
148
- if MAPI_KEY.count == 1:
149
- MAPI_KEY.count = 0
180
+ if NX.debug_request:
181
+ # sym = NX._symbol_responseCode_[str(response.status_code)[0]]
182
+ # print(Fore.RED+f">> METHOD : {method} | URL : {command} | STATUS : "+Fore.YELLOW+f" {response.status_code} "+Fore.RED+f"| TIME : {elapsed_time:.4f} sec "+Style.RESET_ALL)
183
+ print(Fore.RED+f">> METHOD : {method} | URL : {command} | STATUS : {response.status_code} | TIME : {elapsed_time:.4f} sec "+Style.RESET_ALL)
184
+ if NX.debug_requestJSON:
185
+ print(Fore.CYAN+">> "+str(body)+Style.RESET_ALL)
186
+ if NX.debug_response:
187
+ print(Fore.GREEN+">> "+str(response.json())+Style.RESET_ALL)
188
+
189
+ if MAPI_KEY.count == 0:
190
+ MAPI_KEY.count = -1
150
191
  if response.status_code == 404:
151
192
  print(Fore.RED +'\n╭─ 💀 ─────────────────────────────────────────────────────────────────────────────╮')
152
193
  print(f"│ Civil NX model is not connected. Click on 'Apps > Connect' in Civil NX. │")
153
194
  print(f"│ Make sure the MAPI Key in python code is matching with the MAPI key in Civil NX. │")
154
195
  print('╰────────────────────────────────────────────────────────────────────────────────────╯\n'+Style.RESET_ALL)
155
196
  sys.exit(0)
156
-
157
- if NX.user_print:
158
- _checkUSER()
159
197
 
160
198
 
161
199
 
@@ -252,6 +252,7 @@ class Model:
252
252
  Boundary.create()
253
253
  Load.create()
254
254
  Tendon.create()
255
+ if Section.TaperedGroup.data !=[] : Section.TaperedGroup.create()
255
256
 
256
257
  LoadCombination.create()
257
258
 
@@ -207,6 +207,7 @@ class Result :
207
207
 
208
208
 
209
209
  class TABLE :
210
+
210
211
  @staticmethod
211
212
  def BeamForce_VBM(keys=[],loadcase:list=[],items=['all'],parts=["PartI", "PartJ"],components=['all'],force_unit='KN',len_unit='M'):
212
213
  '''
@@ -47,7 +47,7 @@ class _SS_TAPERED_DBUSER(_common):
47
47
  def _objectify(id,name,type,shape,offset,uShear,u7DOF,js):
48
48
  return _SS_TAPERED_DBUSER(name,shape,js['SECT_BEFORE']['SECT_I']['vSIZE'],js['SECT_BEFORE']['SECT_J']['vSIZE'],offset,uShear,u7DOF,id)
49
49
 
50
- def _centerLine(shape,end):
50
+ def _centerLine(shape,end,*args):
51
51
  if end:
52
52
  shape.PARAMS = shape.PARAMS_J
53
53
  # print(' J end taken')
@@ -263,8 +263,8 @@ class Section:
263
263
 
264
264
  data = []
265
265
 
266
- def __init__(self, name, elem_list, z_var, y_var, z_exp=None, z_from=None, z_dist=None,
267
- y_exp=None, y_from=None, y_dist=None, id=""):
266
+ def __init__(self, name, elem_list, z_var="LINEAR", y_var="LINEAR", z_exp=2.0, z_from="i", z_dist=0,
267
+ y_exp=2.0, y_from="i", y_dist=0, id=""):
268
268
  """
269
269
  Args:
270
270
  name (str): Tapered Group Name (Required).
@@ -43,7 +43,7 @@ class _SS_DBUSER(_common):
43
43
  def _objectify(id,name,type,shape,offset,uShear,u7DOF,js):
44
44
  return _SS_DBUSER(name,shape,js['SECT_BEFORE']['SECT_I']['vSIZE'],offset,uShear,u7DOF,id)
45
45
 
46
- def _centerLine(shape,end):
46
+ def _centerLine(shape,*args):
47
47
  if shape.SHAPE == 'SB' :
48
48
  H,B = shape.PARAMS[:2]
49
49
 
@@ -54,13 +54,13 @@ class _SS_DBUSER(_common):
54
54
  sect_cg_RB = [B/2,-H/2]
55
55
 
56
56
  if H > B :
57
- sect_shape = [[0,0],[0,H/2],[0,-H/2],[0,H/4],[0,-H/4]]
58
- sect_thk = [B,B,B,B]
59
- sect_thk_off = [0,0,0,0]
57
+ sect_shape = [[0,0],[0,H/2],[0,-H/2]]
58
+ sect_thk = [B,B]
59
+ sect_thk_off = [0,0]
60
60
  else :
61
- sect_shape = [[0,0],[B/2,0],[-B/2,0],[B/4,0],[-B/4,0]]
62
- sect_thk = [H,H,H,H]
63
- sect_thk_off = [0,0,0,0]
61
+ sect_shape = [[0,0],[B/2,0],[-B/2,0]]
62
+ sect_thk = [H,H]
63
+ sect_thk_off = [0,0]
64
64
 
65
65
  elif shape.SHAPE == 'L' :
66
66
  H,B,tw,tf = shape.PARAMS[:4]
@@ -115,7 +115,7 @@ class _SS_PSC_12CELL(_common):
115
115
  vD[0],vD[1],vD[2],vD[3],vD[4],vD[5],vD[6],vD[7],
116
116
  offset,uShear,u7DOF,id)
117
117
 
118
- def _centerLine(shape,end):
118
+ def _centerLine(shape,*args):
119
119
  if shape.SHAPE == '1CEL':
120
120
  BO1 = shape.BO1
121
121
  BO2 = shape.BO2