1+ // Copyright 2023, ANSYS Inc. Unauthorized use, distribution or duplication is prohibited.
2+ syntax = "proto3" ;
3+ package ansys.api.geometry.v0.bodies ;
4+
5+ import "ansys/api/dbu/v0/dbumodels.proto" ;
6+ import "ansys/api/geometry/v0/models.proto" ;
7+ import "google/protobuf/empty.proto" ;
8+
9+ option csharp_namespace = "Ansys.Api.Geometry.V0.Bodies" ;
10+
11+ service Bodies
12+ {
13+ rpc Get (GetRequest ) returns (Body );
14+
15+ rpc GetMaster (ansys .api .dbu .v0 .EntityIdentifier ) returns (Body );
16+
17+ rpc GetOriginal (ansys .api .dbu .v0 .EntityIdentifier ) returns (Body );
18+
19+ rpc GetParent (ansys .api .dbu .v0 .EntityIdentifier ) returns (Part );
20+
21+ rpc GetAll (GetAllRequest ) returns (GetAllResponse ) ;
22+
23+ rpc GetAssignedMaterial (ansys .api .dbu .v0 .EntityIdentifier ) returns (Material );
24+
25+ rpc SetAssignedMaterial (SetAssignedMaterialRequest ) returns (SetAssignedMaterialResponse );
26+
27+ rpc Translate (TranslateRequest ) returns (google .protobuf .Empty );
28+
29+ rpc GetFaces (ansys .api .dbu .v0 .EntityIdentifier ) returns (GetFacesResponse );
30+
31+ rpc CreateBodyFromFace (CreateBodyFromFaceRequest ) returns (Body );
32+
33+ rpc CreateExtrudedBodyFromFaceProfile (CreateExtrudedBodyFromFaceProfileRequest ) returns (Body );
34+
35+ rpc Delete (ansys .api .dbu .v0 .EntityIdentifier ) returns (google .protobuf .Empty );
36+
37+ rpc CreatePlanarBody (CreatePlanarBodyRequest ) returns (Body );
38+
39+ rpc CreateExtrudedBody (CreateExtrudedBodyRequest ) returns (Body );
40+
41+ rpc GetVolume (ansys .api .dbu .v0 .EntityIdentifier ) returns (GetVolumeResponse );
42+
43+ rpc GetTessellation (ansys .api .dbu .v0 .EntityIdentifier ) returns (GetTessellationResponse );
44+
45+ rpc GetEdges (ansys .api .dbu .v0 .EntityIdentifier ) returns (GetEdgesResponse );
46+
47+ rpc GetName (ansys .api .dbu .v0 .EntityIdentifier ) returns (GetNameResponse );
48+
49+ rpc Copy (CopyRequest ) returns (Body );
50+
51+ rpc GetUpdateState (ansys .api .dbu .v0 .EntityIdentifier ) returns (UpdateState );
52+
53+ rpc Boolean (BooleanRequest ) returns (BooleanResponse );
54+ }
55+
56+ message BooleanRequest {
57+ string body1 = 1 ;
58+ string body2 = 2 ;
59+ string method = 3 ;
60+ }
61+
62+ message BooleanResponse {
63+ int32 empty_result = 1 ;
64+ }
65+
66+ enum GetType {
67+ NONE = 0 ;
68+ MASTER = 1 ;
69+ ORIGINAL = 2 ;
70+ PARENT = 3 ;
71+ }
72+
73+ message GetRequest {
74+ string id = 1 ;
75+ GetType body_type = 2 ;
76+ }
77+
78+ message GetAllRequest {
79+ string parent = 1 ;
80+ }
81+
82+ message GetAllResponse {
83+ repeated Body bodies = 1 ;
84+ }
85+
86+ message SetAssignedMaterialRequest {
87+ string id = 1 ;
88+ string material = 2 ;
89+ }
90+
91+ message SetAssignedMaterialResponse {
92+ Material material = 1 ;
93+ }
94+
95+ message TranslateRequest {
96+ repeated string ids = 1 ;
97+ Direction direction = 2 ;
98+ float distance = 3 ;
99+ }
100+
101+ message GetFacesResponse {
102+ repeated Face faces = 1 ;
103+ }
104+
105+ message CreateBodyFromFaceRequest {
106+ string name = 1 ;
107+ string parent = 2 ;
108+ string face = 3 ;
109+ }
110+
111+ message CreateExtrudedBodyFromFaceProfileRequest {
112+ string name = 1 ;
113+ string parent = 2 ;
114+ string face = 3 ;
115+ double distance = 4 ;
116+ }
117+
118+ message CreatePlanarBodyRequest {
119+ string name = 1 ;
120+ string parent = 2 ;
121+ Plane plane = 3 ;
122+ Geometries geometries = 4 ;
123+ }
124+
125+ message CreateExtrudedBodyRequest {
126+ string name = 1 ;
127+ string parent = 2 ;
128+ Plane plane = 3 ;
129+ Geometries geometries = 4 ;
130+ double distance = 5 ;
131+ }
132+
133+ message GetVolumeResponse {
134+ double volume = 1 ;
135+ }
136+
137+ message GetTessellationResponse {
138+ map <string , Tessellation > face_tessellation = 1 ;
139+ }
140+
141+ message GetEdgesResponse {
142+ repeated Edge edges = 1 ;
143+ }
144+
145+ message GetNameResponse {
146+ string name = 1 ;
147+ }
148+
149+ message CopyRequest {
150+ string id = 1 ;
151+ string parent = 2 ;
152+ string name = 3 ;
153+ }
0 commit comments