Skip to content

Commit 7e56087

Browse files
adding tracker to components.
1 parent 7a2c6a8 commit 7e56087

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from ..base.conversions import from_measurement_to_server_length
2929
from ..base.prepare_tools import GRPCPrepareToolsService
30-
from .conversions import build_grpc_id
30+
from .conversions import build_grpc_id, serialize_tracker_command_response
3131

3232

3333
class GRPCPrepareToolsServiceV0(GRPCPrepareToolsService):
@@ -66,6 +66,7 @@ def extract_volume_from_faces(self, **kwargs) -> dict: # noqa: D102
6666
return {
6767
"success": response.success,
6868
"created_bodies": [body.id for body in response.created_bodies],
69+
"tracker_response": response.changes,
6970
}
7071

7172
@protect_grpc
@@ -81,10 +82,16 @@ def extract_volume_from_edge_loops(self, **kwargs) -> dict: # noqa: D102
8182
# Call the gRPC service
8283
response = self.stub.ExtractVolumeFromEdgeLoops(request)
8384

85+
serialized_tracker_response = serialize_tracker_command_response(
86+
response=response.complete_command_response
87+
)
88+
8489
# Return the response - formatted as a dictionary
8590
return {
8691
"success": response.success,
8792
"created_bodies": [body.id for body in response.created_bodies],
93+
"complete_command_response": serialized_tracker_response,
94+
8895
}
8996

9097
@protect_grpc

src/ansys/geometry/core/tools/prepare_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def extract_volume_from_faces(
125125
if response.get("success"):
126126
bodies_ids = response.get("created_bodies")
127127
if len(bodies_ids) > 0:
128-
parent_design._update_design_inplace()
128+
#parent_design._update_design_inplace()
129+
parent_design._update_from_tracker(response.get("tracker_response"))
129130
return get_bodies_from_ids(parent_design, bodies_ids)
130131
else:
131132
self._grpc_client.log.info("Failed to extract volume from faces...")

0 commit comments

Comments
 (0)