@@ -10,10 +10,9 @@ import "ansys/api/additive/v0/additive_domain.proto";
1010// Units are SI unless otherwise noted
1111
1212service SimulationService {
13- rpc SimulateSingleBead (SimulateSingleBeadRequest ) returns (stream SimulationResponse );
14- rpc SimulatePorosity (SimulatePorosityRequest ) returns (stream SimulationResponse );
15- rpc SimulateMicrostructure (SimulateMicrostructureRequest ) returns (stream SimulationResponse );
16- rpc SimulateThermalHistory (SimulateThermalHistoryRequest ) returns (stream SimulationResponse );
13+ rpc Simulate (SimulationRequest ) returns (stream SimulationResponse );
14+ rpc UploadFile (stream FileUploadRequest ) returns (stream FileUploadResponse );
15+ rpc DownloadFile (FileDownloadRequest ) returns (stream FileDownloadResponse );
1716}
1817
1918message SimulationResponse {
@@ -27,54 +26,49 @@ message SimulationResponse {
2726 }
2827}
2928
30- message SimulateSingleBeadRequest {
29+ message SimulationRequest {
3130 string id = 1 ;
32- double bead_length = 2 ;
33- BeadType bead_type = 3 ;
34- MachineSettings machine = 10 ;
35- AdditiveMaterial material = 11 ;
31+ oneof Input {
32+ SingleBeadInput single_bead_input = 10 ;
33+ PorosityInput porosity_input = 11 ;
34+ MicrostructureInput microstructure_input = 12 ;
35+ ThermalHistoryInput thermal_history_input = 13 ;
36+ }
3637}
3738
38- enum BeadType {
39- BEAD_TYPE_UNSPECIFIED = 0 ;
40- BEAD_TYPE_BEAD_ON_POWDER_LAYER = 1 ;
41- BEAD_TYPE_BEAD_ON_BASE_PLATE = 2 ;
39+ // FileUploadRequst is used to transfer a file in chunks from
40+ // a client to the server. Each message should be less than
41+ // 4 MB unless the gRPC max message size has been changed.
42+ // Following the transfer of the file contents, a final message
43+ // must be sent which includes the md5 sum of the entire file.
44+ message FileUploadRequest {
45+ string name = 1 ;
46+ uint64 total_size = 2 ;
47+ oneof Data {
48+ bytes content = 3 ;
49+ string md5 = 4 ; // sent when transfer is complete
50+ }
4251}
4352
44- message SimulatePorosityRequest {
45- string id = 1 ;
46- double size_x = 2 ;
47- double size_y = 3 ;
48- double size_z = 4 ;
49- MachineSettings machine = 10 ;
50- AdditiveMaterial material = 11 ;
53+ message FileUploadResponse {
54+ string remote_file_name = 1 ;
55+ Progress progress = 2 ;
5156}
5257
53- message SimulateMicrostructureRequest {
54- string id = 1 ;
55- double cube_min_x = 3 ;
56- double cube_min_y = 4 ;
57- double cube_min_z = 5 ;
58- double cube_size_x = 6 ;
59- double cube_size_y = 7 ;
60- double cube_size_z = 8 ;
61- double sensor_dimension = 9 ;
62- // indicates that cooling_rate, thermal_gradient, melt_pool* have been provided by user
63- bool use_provided_thermal_parameters = 10 ;
64- MachineSettings machine = 15 ;
65- AdditiveMaterial material = 16 ;
66- double cooling_rate = 20 ; // K/s
67- double thermal_gradient = 21 ; // K/m
68- double melt_pool_width = 22 ;
69- double melt_pool_depth = 23 ;
70- // indicates that random_seed has been provided by the user
71- bool use_random_seed = 24 ;
72- uint32 random_seed = 25 ;
58+ message FileDownloadRequest {
59+ string remote_file_name = 1 ;
7360}
7461
75- message SimulateThermalHistoryRequest {
76- Geometry geometry = 1 ;
77- CoaxialAverageSensorInputs coax_ave_sensor_inputs = 2 ;
78- MachineSettings machine = 10 ;
79- AdditiveMaterial material = 11 ;
62+ // FileDownloadRequst is used to transfer a file in chunks from
63+ // the server to a client. Each message should be less than
64+ // 4 MB unless the gRPC max message size has been changed.
65+ // Following the transfer of the file contents, a final message
66+ // must be sent which includes the md5 sum of the entire file.
67+ message FileDownloadResponse {
68+ string file_name = 1 ;
69+ uint64 total_size = 2 ;
70+ oneof Data {
71+ bytes content = 3 ;
72+ string md5 = 4 ; // sent when transfer is complete
73+ }
8074}
0 commit comments