Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/2460.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: prepare tools FindLogos and FindAndRemoveLogos
11 changes: 7 additions & 4 deletions src/ansys/geometry/core/_grpc/_services/v1/prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -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,
Expand All @@ -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
Expand Down
Loading