From f244df5b9ceb94549441d55a60cfb332cc539281 Mon Sep 17 00:00:00 2001 From: Matteo Bini <91963243+b-matteo@users.noreply.github.com> Date: Thu, 11 Dec 2025 10:18:12 +0100 Subject: [PATCH 1/3] Fix prepare tools FindLogos and FindAndRemoveLogos parsing the newly added field in v1 protos logo_problem_area_id for FindLogos import the right request for FindAndRemoveLogo (FindAndRemoveLogoRequest instead of FindLogoRequest) Parse the tracked_command_response response's subfield as return value --- .../geometry/core/_grpc/_services/v1/prepare_tools.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ansys/geometry/core/_grpc/_services/v1/prepare_tools.py b/src/ansys/geometry/core/_grpc/_services/v1/prepare_tools.py index 768c615093..db98c6fc2c 100644 --- a/src/ansys/geometry/core/_grpc/_services/v1/prepare_tools.py +++ b/src/ansys/geometry/core/_grpc/_services/v1/prepare_tools.py @@ -190,13 +190,16 @@ def find_logos(self, **kwargs) -> dict: # noqa: D102 # Return the response - formatted as a dictionary return { - "id": response.id, + "id": response.logo_problem_area_id.id, "face_ids": [face.id for face in response.logo_faces], } @protect_grpc def find_and_remove_logos(self, **kwargs) -> dict: # noqa: D102 - from ansys.api.discovery.v1.operations.prepare_pb2 import FindLogoOptions, FindLogosRequest + from ansys.api.discovery.v1.operations.prepare_pb2 import ( + FindAndRemoveLogosRequest, + FindLogoOptions, + ) # Check height objects min_height = ( @@ -211,7 +214,7 @@ def find_and_remove_logos(self, **kwargs) -> dict: # noqa: D102 ) # Create the request - assumes all inputs are valid and of the proper type - request = FindLogosRequest( + request = FindAndRemoveLogosRequest( body_ids=[build_grpc_id(body) for body in kwargs["bodies"]], options=FindLogoOptions( min_height=min_height, @@ -223,7 +226,7 @@ def find_and_remove_logos(self, **kwargs) -> dict: # noqa: D102 response = self.stub.FindAndRemoveLogos(request) # Return the response - formatted as a dictionary - return get_standard_tracker_response(response) + return get_standard_tracker_response(response.tracked_command_response) @protect_grpc def remove_logo(self, **kwargs): # noqa: D102 From 3502b4a86f8c7d9634e78656edbf906708aed23a Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Thu, 11 Dec 2025 09:21:38 +0000 Subject: [PATCH 2/3] chore: adding changelog file 2460.maintenance.md [dependabot-skip] --- doc/changelog.d/2460.maintenance.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/2460.maintenance.md diff --git a/doc/changelog.d/2460.maintenance.md b/doc/changelog.d/2460.maintenance.md new file mode 100644 index 0000000000..7d74b172c6 --- /dev/null +++ b/doc/changelog.d/2460.maintenance.md @@ -0,0 +1 @@ +Chore: fix/prepare tools FindLogos and FindAndRemoveLogos From 54b4433c0df27a91080695ad736fe7e71d8a709f Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Thu, 11 Dec 2025 13:34:59 +0000 Subject: [PATCH 3/3] chore: adding changelog file 2460.fixed.md [dependabot-skip] --- doc/changelog.d/2460.fixed.md | 1 + doc/changelog.d/2460.maintenance.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 doc/changelog.d/2460.fixed.md delete mode 100644 doc/changelog.d/2460.maintenance.md diff --git a/doc/changelog.d/2460.fixed.md b/doc/changelog.d/2460.fixed.md new file mode 100644 index 0000000000..31457f3de7 --- /dev/null +++ b/doc/changelog.d/2460.fixed.md @@ -0,0 +1 @@ +Fix: prepare tools FindLogos and FindAndRemoveLogos diff --git a/doc/changelog.d/2460.maintenance.md b/doc/changelog.d/2460.maintenance.md deleted file mode 100644 index 7d74b172c6..0000000000 --- a/doc/changelog.d/2460.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Chore: fix/prepare tools FindLogos and FindAndRemoveLogos