2626from ansys .geometry .core .errors import protect_grpc
2727
2828from ..base .assembly_controls import GRPCAssemblyControlsService
29+ from .conversions import build_grpc_id
2930
3031
3132class GRPCAssemblyControlsServiceV0 (GRPCAssemblyControlsService ):
@@ -49,16 +50,15 @@ def __init__(self, channel: grpc.Channel): # noqa: D102
4950
5051 @protect_grpc
5152 def create_align_condition (self , ** kwargs ) -> dict : # noqa: D102
52- from ansys .api .dbu .v0 .dbumodels_pb2 import EntityIdentifier
5353 from ansys .api .geometry .v0 .commands_pb2 import (
5454 CreateAlignTangentOrientGearConditionRequest ,
5555 )
5656
5757 # Create the request - assumes all inputs are valid and of the proper type
5858 request = CreateAlignTangentOrientGearConditionRequest (
59- parent = EntityIdentifier ( id = kwargs ["parent_id" ]),
60- geometric_a = EntityIdentifier ( id = kwargs ["geometric_a_id" ]),
61- geometric_b = EntityIdentifier ( id = kwargs ["geometric_b_id" ]),
59+ parent = build_grpc_id ( kwargs ["parent_id" ]),
60+ geometric_a = build_grpc_id ( kwargs ["geometric_a_id" ]),
61+ geometric_b = build_grpc_id ( kwargs ["geometric_b_id" ]),
6262 )
6363
6464 # Call the gRPC service
@@ -77,16 +77,15 @@ def create_align_condition(self, **kwargs) -> dict: # noqa: D102
7777
7878 @protect_grpc
7979 def create_tangent_condition (self , ** kwargs ) -> dict : # noqa: D102
80- from ansys .api .dbu .v0 .dbumodels_pb2 import EntityIdentifier
8180 from ansys .api .geometry .v0 .commands_pb2 import (
8281 CreateAlignTangentOrientGearConditionRequest ,
8382 )
8483
8584 # Create the request - assumes all inputs are valid and of the proper type
8685 request = CreateAlignTangentOrientGearConditionRequest (
87- parent = EntityIdentifier ( id = kwargs ["parent_id" ]),
88- geometric_a = EntityIdentifier ( id = kwargs ["geometric_a_id" ]),
89- geometric_b = EntityIdentifier ( id = kwargs ["geometric_b_id" ]),
86+ parent = build_grpc_id ( kwargs ["parent_id" ]),
87+ geometric_a = build_grpc_id ( kwargs ["geometric_a_id" ]),
88+ geometric_b = build_grpc_id ( kwargs ["geometric_b_id" ]),
9089 )
9190
9291 # Call the gRPC service
@@ -105,16 +104,15 @@ def create_tangent_condition(self, **kwargs) -> dict: # noqa: D102
105104
106105 @protect_grpc
107106 def create_orient_condition (self , ** kwargs ) -> dict : # noqa: D102
108- from ansys .api .dbu .v0 .dbumodels_pb2 import EntityIdentifier
109107 from ansys .api .geometry .v0 .commands_pb2 import (
110108 CreateAlignTangentOrientGearConditionRequest ,
111109 )
112110
113111 # Create the request - assumes all inputs are valid and of the proper type
114112 request = CreateAlignTangentOrientGearConditionRequest (
115- parent = EntityIdentifier ( id = kwargs ["parent_id" ]),
116- geometric_a = EntityIdentifier ( id = kwargs ["geometric_a_id" ]),
117- geometric_b = EntityIdentifier ( id = kwargs ["geometric_b_id" ]),
113+ parent = build_grpc_id ( kwargs ["parent_id" ]),
114+ geometric_a = build_grpc_id ( kwargs ["geometric_a_id" ]),
115+ geometric_b = build_grpc_id ( kwargs ["geometric_b_id" ]),
118116 )
119117
120118 # Call the gRPC service
0 commit comments