Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/ansys/api/acp/v0/array_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ syntax = "proto3";
package ansys.api.acp.v0.array_types;

message DoubleArray {
repeated double data = 1 [packed=true];
repeated int64 shape = 2 [packed=true];
repeated double data = 1 [ packed = true ];
repeated int64 shape = 2 [ packed = true ];
}

message IntArray {
repeated int64 data = 1 [packed=true];
repeated int64 shape = 2 [packed=true];
repeated int64 data = 1 [ packed = true ];
repeated int64 shape = 2 [ packed = true ];
}

message Int32Array {
repeated int32 data = 1 [ packed = true ];
repeated int64 shape = 2 [ packed = true ];
}
19 changes: 5 additions & 14 deletions src/ansys/api/acp/v0/base.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
syntax = "proto3";
package ansys.api.acp.v0.base;

message Empty {
}
message Empty {}

message ResourcePath {
string value = 1;
}
message ResourcePath { string value = 1; }

message CollectionPath {
string value = 1;
}
message CollectionPath { string value = 1; }

message BasicInfo {
ResourcePath resource_path = 1;
Expand All @@ -19,15 +14,11 @@ message BasicInfo {
int64 version = 4;
}

message GetRequest {
ResourcePath resource_path = 1;
}
message GetRequest { ResourcePath resource_path = 1; }

message DeleteRequest {
ResourcePath resource_path = 1;
int64 version = 2;
}

message ListRequest {
CollectionPath collection_path = 1;
}
message ListRequest { CollectionPath collection_path = 1; }
4 changes: 1 addition & 3 deletions src/ansys/api/acp/v0/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ package ansys.api.acp.v0.control;

import "ansys/api/acp/v0/base.proto";

service Control {
rpc ShutdownServer(base.Empty) returns (base.Empty);
}
service Control { rpc ShutdownServer(base.Empty) returns (base.Empty); }
2 changes: 1 addition & 1 deletion src/ansys/api/acp/v0/cut_off_material.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package ansys.api.acp.v0.cut_off_material;

//defines the source of the cut-off material
// defines the source of the cut-off material
enum MaterialHandlingType {
COMPUTED = 0;
GLOBAL = 1;
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/api/acp/v0/drop_off_material.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
syntax = "proto3";
package ansys.api.acp.v0.drop_off_material;

//defines the source of the drop-off material
// defines the source of the drop-off material
enum MaterialHandlingType {
GLOBAL = 0;
CUSTOM = 1;
}

4 changes: 1 addition & 3 deletions src/ansys/api/acp/v0/edge_set.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
4 changes: 1 addition & 3 deletions src/ansys/api/acp/v0/element_set.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
9 changes: 5 additions & 4 deletions src/ansys/api/acp/v0/enum_types.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
syntax = "proto3";
package ansys.api.acp.v0.enum_types;

//the initializers are different in the backend but here it has to be zero-based
// the initializers are different in the backend but here it has to be
// zero-based
enum StatusType {
UNKNOWN = 0;
UPTODATE = 1;
Expand All @@ -19,9 +20,9 @@ enum RosetteSelectionMethod {
DIRECTIONS_FROM_TABULAR_VALUES = 7;
}

//defines the ply type which is used for instance by the solid model
//extrusion and the post-processing to distinguish between isotropic,
//reinforced, and core materials
// defines the ply type which is used for instance by the solid model
// extrusion and the post-processing to distinguish between isotropic,
// reinforced, and core materials
enum PlyType {
REGULAR = 0;
WOVEN = 1;
Expand Down
4 changes: 1 addition & 3 deletions src/ansys/api/acp/v0/fabric.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
26 changes: 9 additions & 17 deletions src/ansys/api/acp/v0/material.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ message InterpolationOptions {
}

message DensityPropertySet {
message Data {
double rho = 1;
}
message Data { double rho = 1; }
repeated Data values = 1;
repeated FieldVariable field_variables = 2;
InterpolationOptions interpolation_options = 3;
Expand Down Expand Up @@ -57,9 +55,7 @@ message OrthotropicEngineeringConstantsPropertySet {
}

message IsotropicStressLimitsPropertySet {
message Data {
double effective_stress = 1;
}
message Data { double effective_stress = 1; }
repeated Data values = 1;
repeated FieldVariable field_variables = 2;
InterpolationOptions interpolation_options = 3;
Expand All @@ -82,9 +78,7 @@ message OrthotropicStressLimitsPropertySet {
}

message IsotropicStrainLimitsPropertySet {
message Data {
double effective_strain = 1;
}
message Data { double effective_strain = 1; }
repeated Data values = 1;
repeated FieldVariable field_variables = 2;
InterpolationOptions interpolation_options = 3;
Expand Down Expand Up @@ -167,9 +161,7 @@ message LaRCConstantsPropertySet {
}

message FabricFiberAnglePropertySet {
message Data {
double fabric_fiber_angle = 1;
}
message Data { double fabric_fiber_angle = 1; }
repeated Data values = 1;
repeated FieldVariable field_variables = 2;
InterpolationOptions interpolation_options = 3;
Expand Down Expand Up @@ -199,8 +191,10 @@ message Properties {
message PropertySets {
DensityPropertySet density = 1;
oneof engineering_constants {
IsotropicEngineeringConstantsPropertySet engineering_constants_isotropic = 2;
OrthotropicEngineeringConstantsPropertySet engineering_constants_orthotropic = 3;
IsotropicEngineeringConstantsPropertySet
engineering_constants_isotropic = 2;
OrthotropicEngineeringConstantsPropertySet
engineering_constants_orthotropic = 3;
}
oneof stress_limits {
IsotropicStressLimitsPropertySet stress_limits_isotropic = 4;
Expand Down Expand Up @@ -232,9 +226,7 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
99 changes: 99 additions & 0 deletions src/ansys/api/acp/v0/mesh_query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
syntax = "proto3";
package ansys.api.acp.v0.mesh_query;

import "ansys/api/acp/v0/base.proto";
import "ansys/api/acp/v0/array_types.proto";

message DataArray {
oneof data {
array_types.DoubleArray double_array = 1;
array_types.IntArray int_array = 2;
array_types.Int32Array int32_array = 3;
}
}

message MeshData {
array_types.Int32Array node_labels = 1;
array_types.DoubleArray node_coordinates = 2;
array_types.Int32Array element_labels = 3;
array_types.Int32Array element_types = 4;
array_types.Int32Array element_nodes = 5;
array_types.Int32Array element_nodes_offsets = 6;
}

enum ElementalDataType {
ELEMENT_COORDINATES = 0;
ELEMENT_NORMAL = 1;
ELEMENT_ORIENTATION = 2;
ELEMENT_REFERENCE_DIRECTION = 3;
ELEMENT_FIBER_DIRECTION = 4;
ELEMENT_DRAPED_FIBER_DIRECTION = 5;
ELEMENT_TRANSVERSE_DIRECTION = 6;
ELEMENT_DRAPED_TRANSVERSE_DIRECTION = 7;
ELEMENT_THICKNESS = 8;
ELEMENT_RELATIVE_THICKNESS_CORRECTION = 9;
ELEMENT_DESIGN_ANGLE = 10;
ELEMENT_SHEAR_ANGLE = 11;
ELEMENT_DRAPED_FIBER_ANGLE = 12;
ELEMENT_DRAPED_TRANSVERSE_ANGLE = 13;
ELEMENT_AREA = 14;
ELEMENT_PRICE = 15;
ELEMENT_VOLUME = 16;
ELEMENT_MASS = 17;
ELEMENT_OFFSET = 18;
ELEMENT_MATERIAL_1_DIRECTION = 19;
ELEMENT_COG = 20;
// NOTE dgresch July '23: The elemental ply offset query currently returns
// the ply offset in absolute coordinates, instead of relative to the
// element. Since this is inconsistent with the nodal ply_offset, this query
// is currently disabled. ELEMENT_PLY_OFFSET = 21;
}

// message ElementScoping {
// enum ElementType {
// ALL = 0;
// SHELL = 1;
// SOLID = 2;
// }
// ElementType element_type = 1;
// }

message GetElementalDataRequest {
// The resource path determines both the entity whose data is being queried,
// as well as the scope for the elements.
// For example, if the resource path is models/<uuid>, then the data will be
// returned for all elements in the model.
// If the resource path represents a Modeling Ply, the scope will be limited
// to the elements in the ply, and the element data corresponding to the
// ply will be returned.
base.ResourcePath resource_path = 1;
repeated ElementalDataType data_types = 2;
// ElementScoping scoping = 3;
}

message ElementalData {
array_types.Int32Array labels = 1;
repeated ElementalDataType data_types = 2;
repeated DataArray data_arrays = 3;
}

enum NodalDataType {
NODE_PLY_OFFSET = 0;
}

message GetNodalDataRequest {
base.ResourcePath resource_path = 1;
repeated NodalDataType data_types = 2;
}

message NodalData {
array_types.Int32Array labels = 1;
repeated NodalDataType data_types = 2;
repeated DataArray data_arrays = 3;
}

service MeshQueryService {
rpc GetMeshData(base.GetRequest) returns (MeshData);
rpc GetElementalData(GetElementalDataRequest) returns (ElementalData);
rpc GetNodalData(GetNodalDataRequest) returns (NodalData);
}
11 changes: 4 additions & 7 deletions src/ansys/api/acp/v0/model.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message LoadFromFileRequest {
string path = 1;
}
message LoadFromFileRequest { string path = 1; }

// Special Model messages

Expand Down Expand Up @@ -99,5 +95,6 @@ service ObjectService {

rpc SaveAnalysisModel(SaveAnalysisModelRequest) returns (base.Empty);

rpc SaveShellCompositeDefinitions(SaveShellCompositeDefinitionsRequest) returns (base.Empty);
rpc SaveShellCompositeDefinitions(SaveShellCompositeDefinitionsRequest)
returns (base.Empty);
}
7 changes: 2 additions & 5 deletions src/ansys/api/acp/v0/modeling_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ package ansys.api.acp.v0.modeling_group;

import "ansys/api/acp/v0/base.proto";

message Properties {
}
message Properties {}

message ObjectInfo {
base.BasicInfo info = 1;
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
4 changes: 1 addition & 3 deletions src/ansys/api/acp/v0/modeling_ply.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
4 changes: 1 addition & 3 deletions src/ansys/api/acp/v0/oriented_selection_set.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ message ObjectInfo {
Properties properties = 2;
}

message ListReply {
repeated ObjectInfo objects = 1;
}
message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
Expand Down
6 changes: 3 additions & 3 deletions src/ansys/api/acp/v0/ply_material.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";
package ansys.api.acp.v0.ply_material;

//defines the draping model (algorithm)
// defines the draping model (algorithm)
enum DrapingMaterialType {
WOVEN = 0;
UD = 1;
}

//defines the symmetry-type for stackups, sublaminates etc
enum SymmetryType {
// defines the symmetry-type for stackups, sublaminates etc
enum SymmetryType {
NO_SYMMETRY = 0;
EVEN_SYMMETRY = 1;
ODD_SYMMETRY = 2;
Expand Down
Loading