9999from ansys .geometry .core .shapes .curves .trimmed_curve import TrimmedCurve
100100from ansys .geometry .core .shapes .parameterization import Interval , ParamUV
101101from ansys .geometry .core .shapes .surfaces import TrimmedSurface
102- from ansys .geometry .core .sketch .arc import Arc
103102from ansys .geometry .core .sketch .sketch import Sketch
104103from ansys .geometry .core .typing import Real
105104
@@ -1149,21 +1148,15 @@ def create_beams(
11491148 self ,
11501149 segments : list [tuple [Point3D , Point3D ]],
11511150 profile : BeamProfile ,
1152- arcs : list [Arc ] = None ,
1153- circles : list [Circle ] = None ,
11541151 ) -> list [Beam ]:
11551152 """Create beams under the component.
11561153
11571154 Parameters
11581155 ----------
11591156 segments : list[tuple[Point3D, Point3D]]
1160- list of start and end pairs, each specifying a single line segment.
1157+ List of start and end pairs, each specifying a single line segment.
11611158 profile : BeamProfile
11621159 Beam profile to use to create the beams.
1163- arcs : list[Curve], default: None
1164- list of arcs to create beams from.
1165- circles : list[Curve], default: None
1166- list of circles to create beams from.
11671160
11681161 Returns
11691162 -------
@@ -1178,7 +1171,7 @@ def create_beams(
11781171 if self ._grpc_client .backend_version < (25 , 2 , 0 ):
11791172 return self .__create_beams_legacy (segments , profile )
11801173 else :
1181- return self .__create_beams (segments , profile , arcs , circles )
1174+ return self .__create_beams (segments , profile )
11821175
11831176 def __create_beams_legacy (
11841177 self , segments : list [tuple [Point3D , Point3D ]], profile : BeamProfile
@@ -1192,7 +1185,7 @@ def __create_beams_legacy(
11921185 Parameters
11931186 ----------
11941187 segments : list[tuple[Point3D, Point3D]]
1195- list of start and end pairs, each specifying a single line segment.
1188+ List of start and end pairs, each specifying a single line segment.
11961189 profile : BeamProfile
11971190 Beam profile to use to create the beams.
11981191
@@ -1229,15 +1222,13 @@ def __create_beams(
12291222 self ,
12301223 segments : list [tuple [Point3D , Point3D ]],
12311224 profile : BeamProfile ,
1232- arcs : list [Arc ],
1233- circles : list [Circle ],
12341225 ) -> list [Beam ]:
12351226 """Create beams under the component.
12361227
12371228 Parameters
12381229 ----------
12391230 segments : list[tuple[Point3D, Point3D]]
1240- list of start and end pairs, each specifying a single line segment.
1231+ List of start and end pairs, each specifying a single line segment.
12411232 profile : BeamProfile
12421233 Beam profile to use to create the beams.
12431234
@@ -1263,50 +1254,52 @@ def __create_beams(
12631254 beams = []
12641255 for beam in response .created_beams :
12651256 cross_section = BeamCrossSectionInfo (
1266- SectionAnchorType (beam .cross_section .section_anchor ),
1267- beam .cross_section .section_angle ,
1268- grpc_frame_to_frame (beam .cross_section .section_frame ),
1269- [
1257+ section_anchor = SectionAnchorType (beam .cross_section .section_anchor ),
1258+ section_angle = beam .cross_section .section_angle ,
1259+ section_frame = grpc_frame_to_frame (beam .cross_section .section_frame ),
1260+ section_profile = [
12701261 [
12711262 TrimmedCurve (
1272- grpc_curve_to_curve (curve .geometry ),
1273- grpc_point_to_point3d (curve .start ),
1274- grpc_point_to_point3d (curve .end ),
1275- Interval (curve .interval_start , curve .interval_end ),
1276- curve .length ,
1263+ geometry = grpc_curve_to_curve (curve .geometry ),
1264+ start = grpc_point_to_point3d (curve .start ),
1265+ end = grpc_point_to_point3d (curve .end ),
1266+ interval = Interval (curve .interval_start , curve .interval_end ),
1267+ length = curve .length ,
12771268 )
12781269 for curve in curve_list
12791270 ]
12801271 for curve_list in beam .cross_section .section_profile
12811272 ],
12821273 )
12831274 properties = BeamProperties (
1284- beam .properties .area ,
1285- ParamUV (beam .properties .centroid_x , beam .properties .centroid_y ),
1286- beam .properties .warping_constant ,
1287- beam .properties .ixx ,
1288- beam .properties .ixy ,
1289- beam .properties .iyy ,
1290- ParamUV (beam .properties .shear_center_x , beam .properties .shear_center_y ),
1291- beam .properties .torsional_constant ,
1275+ area = beam .properties .area ,
1276+ centroid = ParamUV (beam .properties .centroid_x , beam .properties .centroid_y ),
1277+ warping_constant = beam .properties .warping_constant ,
1278+ ixx = beam .properties .ixx ,
1279+ ixy = beam .properties .ixy ,
1280+ iyy = beam .properties .iyy ,
1281+ shear_center = ParamUV (
1282+ beam .properties .shear_center_x , beam .properties .shear_center_y
1283+ ),
1284+ torsion_constant = beam .properties .torsional_constant ,
12921285 )
12931286
12941287 beams .append (
12951288 Beam (
1296- beam .id .id ,
1297- grpc_point_to_point3d (beam .shape .start ),
1298- grpc_point_to_point3d (beam .shape .end ),
1299- profile ,
1300- self ,
1301- beam .name ,
1302- beam .is_deleted ,
1303- beam .is_reversed ,
1304- beam .is_rigid ,
1305- grpc_material_to_material (beam .material ),
1306- cross_section ,
1307- properties ,
1308- beam .shape ,
1309- beam .type ,
1289+ id = beam .id .id ,
1290+ start = grpc_point_to_point3d (beam .shape .start ),
1291+ end = grpc_point_to_point3d (beam .shape .end ),
1292+ profile = profile ,
1293+ parent_component = self ,
1294+ name = beam .name ,
1295+ is_deleted = beam .is_deleted ,
1296+ is_reversed = beam .is_reversed ,
1297+ is_rigid = beam .is_rigid ,
1298+ material = grpc_material_to_material (beam .material ),
1299+ cross_section = cross_section ,
1300+ properties = properties ,
1301+ shape = beam .shape ,
1302+ beam_type = beam .type ,
13101303 )
13111304 )
13121305
0 commit comments