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
2 changes: 1 addition & 1 deletion src/ansys/api/acp/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0.dev1
0.1.0.dev2
30 changes: 30 additions & 0 deletions src/ansys/api/acp/v0/cad_component.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
package ansys.api.acp.v0.cad_component;

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

message Properties {
enum_types.StatusType status = 1;
string path = 2;
// The following properties are not yet supported:
// bool is_free = 3;
// int64 map_index = 4;
}

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

message ListReply { repeated ObjectInfo objects = 1; }

message RefreshRequest { base.ResourcePath resource_path = 1; }

service ObjectService {
// Object is read-only => only list and get endpoints.

rpc List(base.ListRequest) returns (ListReply);

rpc Get(base.GetRequest) returns (ObjectInfo);
}
54 changes: 54 additions & 0 deletions src/ansys/api/acp/v0/cad_geometry.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
syntax = "proto3";
package ansys.api.acp.v0.cad_geometry;

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

message Properties {
enum_types.StatusType status = 1;
bool locked = 2;
string external_path = 3;
double scale_factor = 4;
bool use_default_precision = 5;
double precision = 6;
bool use_default_offset = 7;
double offset = 8;
}

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

message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
string name = 2;
Properties properties = 3;
}

message RefreshRequest { base.ResourcePath resource_path = 1; }

message TriangleMeshData {
array_types.DoubleArray node_coordinates = 1;
array_types.IntArray element_nodes = 2;
}

service ObjectService {
rpc List(base.ListRequest) returns (ListReply);

rpc Get(base.GetRequest) returns (ObjectInfo);

rpc Put(ObjectInfo) returns (ObjectInfo);

rpc Delete(base.DeleteRequest) returns (base.Empty);

rpc Create(CreateRequest) returns (ObjectInfo);

// Refresh the CAD Geometry from the source file
rpc Refresh(RefreshRequest) returns (base.Empty);

rpc GetMesh(base.GetRequest) returns (TriangleMeshData);
}
53 changes: 53 additions & 0 deletions src/ansys/api/acp/v0/virtual_geometry.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
syntax = "proto3";
package ansys.api.acp.v0.virtual_geometry;

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

enum Dimension {
UNKNOWN = 0;
LINE = 1;
SURFACE = 2;
SOLID = 3;
}

message SubShape {
base.ResourcePath cad_geometry = 1;
string path = 2;
}

message Properties {
enum_types.StatusType status = 1;
Dimension dimension = 2;
// Refer to the CADComponent by its (topological) path instead of the
// resource_path, since the CADComponent object may not yet exist in
// the tree (if the geometry is not up-to-date).
// In the backend this is handled by introducing the CADReference object,
// but this is intentionally not exposed via the API.
repeated SubShape sub_shapes = 3;
}

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

message ListReply { repeated ObjectInfo objects = 1; }

message CreateRequest {
base.CollectionPath collection_path = 1;
string name = 2;
Properties properties = 3;
}

service ObjectService {
rpc List(base.ListRequest) returns (ListReply);

rpc Get(base.GetRequest) returns (ObjectInfo);

rpc Put(ObjectInfo) returns (ObjectInfo);

rpc Delete(base.DeleteRequest) returns (base.Empty);

rpc Create(CreateRequest) returns (ObjectInfo);
}