@@ -1164,8 +1164,9 @@ def create_beams(
11641164 return self .__create_beams_legacy (segments , profile )
11651165 else :
11661166 return self .__create_beams (segments , profile , arcs , circles )
1167-
1168- def __create_beams_legacy (self , segments : list [tuple [Point3D , Point3D ]], profile : BeamProfile
1167+
1168+ def __create_beams_legacy (
1169+ self , segments : list [tuple [Point3D , Point3D ]], profile : BeamProfile
11691170 ) -> list [Beam ]:
11701171 """Create beams under the component.
11711172
@@ -1183,7 +1184,7 @@ def __create_beams_legacy(self, segments: list[tuple[Point3D, Point3D]], profile
11831184 Returns
11841185 -------
11851186 list[Beam]
1186- A list of the created Beams.
1187+ A list of the created Beams.
11871188 """
11881189 request = CreateBeamSegmentsRequest (parent = self .id , profile = profile .id )
11891190
@@ -1208,13 +1209,13 @@ def __create_beams_legacy(self, segments: list[tuple[Point3D, Point3D]], profile
12081209
12091210 self ._beams .extend (new_beams )
12101211 return self ._beams [- n_beams :]
1211-
1212+
12121213 def __create_beams (
1213- self ,
1214- segments : list [tuple [Point3D , Point3D ]],
1215- profile : BeamProfile ,
1216- arcs : list [Arc ] = None ,
1217- circles : list [Circle ] = None ,
1214+ self ,
1215+ segments : list [tuple [Point3D , Point3D ]],
1216+ profile : BeamProfile ,
1217+ arcs : list [Arc ] = None ,
1218+ circles : list [Circle ] = None ,
12181219 ) -> list [Beam ]:
12191220 """Create beams under the component.
12201221
@@ -1228,7 +1229,7 @@ def __create_beams(
12281229 Returns
12291230 -------
12301231 list[Beam]
1231- A list of the created Beams.
1232+ A list of the created Beams.
12321233 """
12331234 request = CreateBeamSegmentsRequest (
12341235 profile = profile .id ,
@@ -1251,14 +1252,19 @@ def __create_beams(
12511252 beam .cross_section .section_angle ,
12521253 grpc_frame_to_frame (beam .cross_section .section_frame ),
12531254 [
1254- [TrimmedCurve (
1255- grpc_curve_to_curve (curve .geometry ),
1256- grpc_point_to_point3d (curve .start ),
1257- grpc_point_to_point3d (curve .end ),
1258- Interval (curve .interval_start , curve .interval_end ),
1259- curve .length ) for curve in curve_list ]
1260- for curve_list in beam .cross_section .section_profile ],
1261- )
1255+ [
1256+ TrimmedCurve (
1257+ grpc_curve_to_curve (curve .geometry ),
1258+ grpc_point_to_point3d (curve .start ),
1259+ grpc_point_to_point3d (curve .end ),
1260+ Interval (curve .interval_start , curve .interval_end ),
1261+ curve .length ,
1262+ )
1263+ for curve in curve_list
1264+ ]
1265+ for curve_list in beam .cross_section .section_profile
1266+ ],
1267+ )
12621268 properties = BeamProperties (
12631269 beam .properties .area ,
12641270 ParamUV (beam .properties .centroid_x , beam .properties .centroid_y ),
@@ -1270,7 +1276,7 @@ def __create_beams(
12701276 beam .properties .torsional_constant ,
12711277 )
12721278
1273- beams .append (
1279+ beams .append (
12741280 Beam (
12751281 beam .id .id ,
12761282 grpc_point_to_point3d (beam .shape .start ),
@@ -1288,7 +1294,7 @@ def __create_beams(
12881294 beam .type ,
12891295 )
12901296 )
1291-
1297+
12921298 self ._beams .extend (beams )
12931299 return beams
12941300
0 commit comments