@@ -32,9 +32,12 @@ def __init__(self, dataFilename, asterFilename):
3232 self .create ()
3333
3434 def getGroupName (self , name ):
35- info = name .split ("|" )
36- sortName = "" .join (c for c in info [0 ] if c .isupper ())
37- return f"{ sortName [2 :]} _{ info [1 ]} "
35+ if "|" in name :
36+ info = name .split ("|" )
37+ sortName = "" .join (c for c in info [0 ] if c .isupper ())
38+ return f"{ sortName [2 :]} _{ info [1 ]} "
39+ else :
40+ return name
3841
3942 def create (self ):
4043
@@ -54,7 +57,7 @@ def create(self):
5457 for el in elements :
5558 for rel in el ["connections" ]:
5659 conn = [
57- c for c in connections if c ["ifcName " ] == rel ["relatedConnection" ]
60+ c for c in connections if c ["referenceName " ] == rel ["relatedConnection" ]
5861 ][0 ]
5962 rel ["conn_string" ] = None
6063 if conn ["geometryType" ] == "point" :
@@ -98,21 +101,21 @@ def create(self):
98101
99102 edgeGroupNames = tuple (
100103 [
101- self .getGroupName (el ["ifcName " ])
104+ self .getGroupName (el ["referenceName " ])
102105 for el in elements
103106 if el ["geometryType" ] == "line"
104107 ]
105108 )
106109 faceGroupNames = tuple (
107110 [
108- self .getGroupName (el ["ifcName " ])
111+ self .getGroupName (el ["referenceName " ])
109112 for el in elements
110113 if el ["geometryType" ] == "surface"
111114 ]
112115 )
113116 point0DGroupNames = tuple (
114117 [
115- self .getGroupName (el ["ifcName " ]) + "_0D"
118+ self .getGroupName (el ["referenceName " ]) + "_0D"
116119 for el in connections
117120 if el ["geometryType" ] == "point"
118121 ]
@@ -132,7 +135,7 @@ def create(self):
132135 )
133136 point1DGroupNames = tuple (
134137 [
135- self .getGroupName (el ["ifcName " ]) + "_0D"
138+ self .getGroupName (el ["referenceName " ]) + "_0D"
136139 for el in connections
137140 if el ["geometryType" ] == "line"
138141 ]
@@ -153,14 +156,14 @@ def create(self):
153156 # 'dz': True
154157 # }
155158 if len (conn ["unifiedGroupNames" ]) >= 1 :
156- conn ["unifiedGroupNames" ].insert (0 , self .getGroupName (conn ["ifcName " ]))
159+ conn ["unifiedGroupNames" ].insert (0 , self .getGroupName (conn ["referenceName " ]))
157160 conn ["unifiedGroupNames" ] = tuple (conn ["unifiedGroupNames" ])
158161 unifiedConnection = True
159162 rigidLinkGroupNames .extend (
160163 [
161164 self .getGroupName (rel ["relatingElement" ])
162165 + "_1DR_"
163- + self .getGroupName (conn ["ifcName " ])
166+ + self .getGroupName (conn ["referenceName " ])
164167 for rel in conn ["relatedElements" ]
165168 if rel ["eccentricity" ]
166169 ]
@@ -442,7 +445,7 @@ def create(self):
442445 ),"""
443446
444447 context = {
445- "groupName" : self .getGroupName (el ["ifcName " ]),
448+ "groupName" : self .getGroupName (el ["referenceName " ]),
446449 "thickness" : el ["thickness" ],
447450 "localAxisX" : tuple (el ["orientation" ][0 ]),
448451 }
@@ -469,7 +472,7 @@ def create(self):
469472 ),"""
470473
471474 context = {
472- "groupName" : self .getGroupName (conn ["ifcName " ]) + "_0D" ,
475+ "groupName" : self .getGroupName (conn ["referenceName " ]) + "_0D" ,
473476 "stiffnesses" : conn ["stiffnesses" ],
474477 }
475478
@@ -504,7 +507,7 @@ def create(self):
504507 ),"""
505508
506509 context = {
507- "groupName" : self .getGroupName (conn ["ifcName " ]) + "_0D" ,
510+ "groupName" : self .getGroupName (conn ["referenceName " ]) + "_0D" ,
508511 "stiffnesses" : conn ["stiffnesses" ],
509512 }
510513
@@ -530,7 +533,7 @@ def create(self):
530533 ),"""
531534
532535 context = {
533- "groupName" : self .getGroupName (el ["ifcName " ]),
536+ "groupName" : self .getGroupName (el ["referenceName " ]),
534537 "localAxisY" : tuple (el ["orientation" ][1 ]),
535538 }
536539
@@ -546,7 +549,7 @@ def create(self):
546549 ),"""
547550
548551 context = {
549- "groupName" : self .getGroupName (conn ["ifcName " ]) + "_0D" ,
552+ "groupName" : self .getGroupName (conn ["referenceName " ]) + "_0D" ,
550553 "localAxesXY" : tuple (conn ["orientation" ][0 ] + conn ["orientation" ][1 ]),
551554 }
552555
@@ -581,7 +584,7 @@ def create(self):
581584 ),"""
582585
583586 context = {
584- "groupName" : self .getGroupName (conn ["ifcName " ]) + "_0D" ,
587+ "groupName" : self .getGroupName (conn ["referenceName " ]) + "_0D" ,
585588 "localAxesXY" : tuple (conn ["orientation" ][0 ] + conn ["orientation" ][1 ]),
586589 }
587590
@@ -999,7 +1002,7 @@ def calculateConstraints(self, rel):
9991002 rel ["stiffnesses" ] = tuple (stiffnesses )
10001003
10011004 def calculateRestraints (self , conn ):
1002- group = self .getGroupName (conn ["ifcName " ])
1005+ group = self .getGroupName (conn ["referenceName " ])
10031006 o = np .array (conn ["orientation" ]).transpose ().tolist ()
10041007 liaisons = {"groupNames" : (group , group , group ), "coeffs" : [], "dofs" : []}
10051008 stiffnesses = [0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ]
0 commit comments