@@ -838,12 +838,16 @@ def scale(self, **kwargs) -> dict: # noqa: D102
838838
839839 @protect_grpc
840840 def mirror (self , ** kwargs ) -> dict : # noqa: D102
841- from ansys .api .discovery .v1 .operations .edit_pb2 import MirrorRequest
841+ from ansys .api .discovery .v1 .operations .edit_pb2 import MirrorRequest , MirrorRequestData
842842
843843 # Create the request - assumes all inputs are valid and of the proper type
844844 request = MirrorRequest (
845- selection_ids = [build_grpc_id (kwargs ["id" ])],
846- plane = from_plane_to_grpc_plane (kwargs ["plane" ]),
845+ request_data = [
846+ MirrorRequestData (
847+ ids = [build_grpc_id (kwargs ["id" ])],
848+ mirror_plane = from_plane_to_grpc_plane (kwargs ["plane" ]),
849+ )
850+ ]
847851 )
848852
849853 # Call the gRPC service
@@ -1044,31 +1048,40 @@ def combine(self, **kwargs) -> dict: # noqa: D102
10441048 else :
10451049 raise ValueError (f"Invalid boolean operation type: { type_bool_op } " )
10461050
1047- if not response .success :
1051+ if not response .tracked_command_response . command_response . success :
10481052 raise ValueError (f"Boolean operation failed: { response } " )
10491053
10501054 # Return the response - formatted as a dictionary
10511055 return {"complete_command_response" : response }
10521056
10531057 @protect_grpc
10541058 def split_body (self , ** kwargs ) -> dict : # noqa: D102
1055- from ansys .api .discovery .v1 .operations .edit_pb2 import SplitBodyRequest
1059+ from ansys .api .discovery .v1 .operations .edit_pb2 import (
1060+ SplitBodyRequest ,
1061+ SplitBodyRequestData ,
1062+ )
10561063
10571064 # Create the request - assumes all inputs are valid and of the proper type
10581065 request = SplitBodyRequest (
1059- selection = [build_grpc_id (id ) for id in kwargs ["body_ids" ]],
1060- split_by_plane = from_plane_to_grpc_plane (kwargs ["plane" ]) if kwargs ["plane" ] else None ,
1061- split_by_slicer = [build_grpc_id (id ) for id in kwargs ["slicer_ids" ]],
1062- split_by_faces = [build_grpc_id (id ) for id in kwargs ["face_ids" ]],
1063- extend_surfaces = kwargs ["extend_surfaces" ],
1066+ request_data = [
1067+ SplitBodyRequestData (
1068+ selection_ids = [build_grpc_id (id ) for id in kwargs ["body_ids" ]],
1069+ split_by_plane = (
1070+ from_plane_to_grpc_plane (kwargs ["plane" ]) if kwargs ["plane" ] else None
1071+ ),
1072+ split_by_slicer_ids = [build_grpc_id (id ) for id in kwargs ["slicer_ids" ]],
1073+ split_by_face_ids = [build_grpc_id (id ) for id in kwargs ["face_ids" ]],
1074+ extend_surfaces = kwargs ["extend_surfaces" ],
1075+ )
1076+ ]
10641077 )
10651078
10661079 # Call the gRPC service
10671080 resp = self .edit_stub .SplitBodies (request = request )
10681081
10691082 # Return the response - formatted as a dictionary
10701083 return {
1071- "success" : resp .success ,
1084+ "success" : resp .tracked_command_response . command_response . success ,
10721085 }
10731086
10741087 @protect_grpc
0 commit comments