Skip to content

Commit 95cbf89

Browse files
chore: auto fixes from pre-commit hooks
1 parent 509daf8 commit 95cbf89

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

src/ansys/geometry/core/_grpc/_services/v0/bodies.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -771,16 +771,23 @@ def create_body_from_loft_profiles_with_guides(self, **kwargs): # noqa: D102
771771

772772
# Create request object - assumes all inputs are valid and of the proper type
773773
request = CreateBodyFromLoftWithGuidesRequest(
774-
request_data=[CreateBodyFromLoftWithGuidesRequestData(
775-
name=kwargs["name"],
776-
parent=EntityIdentifier(id=kwargs["parent_id"]),
777-
profiles=[TrimmedCurveList(
778-
curves=[from_trimmed_curve_to_grpc_trimmed_curve(tc) for tc in profile]
779-
) for profile in kwargs["profiles"]],
780-
guides=TrimmedCurveList(
781-
curves=[from_trimmed_curve_to_grpc_trimmed_curve(tc) for tc in kwargs["guides"]]
782-
),
783-
)]
774+
request_data=[
775+
CreateBodyFromLoftWithGuidesRequestData(
776+
name=kwargs["name"],
777+
parent=EntityIdentifier(id=kwargs["parent_id"]),
778+
profiles=[
779+
TrimmedCurveList(
780+
curves=[from_trimmed_curve_to_grpc_trimmed_curve(tc) for tc in profile]
781+
)
782+
for profile in kwargs["profiles"]
783+
],
784+
guides=TrimmedCurveList(
785+
curves=[
786+
from_trimmed_curve_to_grpc_trimmed_curve(tc) for tc in kwargs["guides"]
787+
]
788+
),
789+
)
790+
]
784791
)
785792

786793
# Call the gRPC service
@@ -793,6 +800,6 @@ def create_body_from_loft_profiles_with_guides(self, **kwargs): # noqa: D102
793800
"name": body.name,
794801
"master_id": body.master_id,
795802
"is_surface": body.is_surface,
796-
}
803+
}
797804
for body in response.created_bodies
798-
]
805+
]

src/ansys/geometry/core/_grpc/_services/v1/bodies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def get_tesellation_with_options(self, **kwargs) -> dict: # noqa: D102
191191
@protect_grpc
192192
def boolean(self, **kwargs) -> dict: # noqa: D102
193193
raise NotImplementedError
194-
194+
195195
@protect_grpc
196196
def create_body_from_loft_profiles_with_guides(self, **kwargs) -> dict: # noqa: D102
197197
raise NotImplementedError

src/ansys/geometry/core/designer/component.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,17 +964,18 @@ def create_body_from_loft_profile(
964964
ruled=ruled,
965965
)
966966
return self.__build_body_from_response(response)
967-
967+
968968
@check_input_types
969969
@ensure_design_is_active
970970
@min_backend_version(26, 1, 0)
971971
def create_body_from_loft_profiles_with_guides(
972-
self, name: str,
972+
self,
973+
name: str,
973974
profiles: list[list[TrimmedCurve]],
974975
guides: list[TrimmedCurve],
975976
) -> Body:
976977
"""Create a lofted body from a collection of trimmed curves with guide curves.
977-
978+
978979
Parameters
979980
----------
980981
name : str

tests/integration/test_design.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,10 +2930,12 @@ def test_create_body_from_loft_profile_with_guides(modeler: Modeler):
29302930
def circle_point(center, radius, angle_deg):
29312931
# Returns a point on the circle at the given angle
29322932
angle_rad = np.deg2rad(angle_deg)
2933-
return Point3D([
2934-
center[0] + radius.m * np.cos(angle_rad),
2935-
center[1] + radius.m * np.sin(angle_rad),
2936-
center[2]]
2933+
return Point3D(
2934+
[
2935+
center[0] + radius.m * np.cos(angle_rad),
2936+
center[1] + radius.m * np.sin(angle_rad),
2937+
center[2],
2938+
]
29372939
)
29382940

29392941
angles = [0, 90, 180, 270]

0 commit comments

Comments
 (0)