From 36e513aafde7bb2a45782e95a29eda843ba05397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Roos?= Date: Wed, 16 Aug 2023 06:31:10 +0200 Subject: [PATCH 1/2] add protos sublaminate and update fabric and stackup --- src/ansys/api/acp/v0/fabric.proto | 5 ++- src/ansys/api/acp/v0/stackup.proto | 4 ++ src/ansys/api/acp/v0/sublaminate.proto | 52 ++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/ansys/api/acp/v0/sublaminate.proto diff --git a/src/ansys/api/acp/v0/fabric.proto b/src/ansys/api/acp/v0/fabric.proto index f807f0f..d0b8a35 100644 --- a/src/ansys/api/acp/v0/fabric.proto +++ b/src/ansys/api/acp/v0/fabric.proto @@ -17,7 +17,10 @@ message Properties { ply_material.DrapingMaterialType draping_material_model = 7; double draping_ud_coefficient = 8; base.ResourcePath material = 9; - // todo: drop-off and cut-off material links (resource path) + // todo: drop-off and cut-off material links (resource path). + + //read only properties + double area_weight = 10; } message ObjectInfo { diff --git a/src/ansys/api/acp/v0/stackup.proto b/src/ansys/api/acp/v0/stackup.proto index 1a41e76..b2b93b7 100644 --- a/src/ansys/api/acp/v0/stackup.proto +++ b/src/ansys/api/acp/v0/stackup.proto @@ -28,6 +28,10 @@ message Properties { base.ResourcePath drop_off_material = 9; cut_off_material.MaterialHandlingType cut_off_material_handling = 10; base.ResourcePath cut_off_material = 11; + + // read only properties + double thickness = 12; + double area_weight = 13; } message ObjectInfo { diff --git a/src/ansys/api/acp/v0/sublaminate.proto b/src/ansys/api/acp/v0/sublaminate.proto new file mode 100644 index 0000000..0bd7d9b --- /dev/null +++ b/src/ansys/api/acp/v0/sublaminate.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package ansys.api.acp.v0.sublaminate; + +import "ansys/api/acp/v0/base.proto"; +import "ansys/api/acp/v0/enum_types.proto"; +import "ansys/api/acp/v0/ply_material.proto"; + +// Note: material can be of type Fabric or Stackup +message SubLaminateMaterialWithAngle { + base.ResourcePath material = 1; + double angle = 2; +} + +// Note: draping and solid model properties are defined by the fabric and stackup +message Properties { + // general properties + enum_types.StatusType status = 1; + ply_material.SymmetryType symmetry = 2; + // topdown=True: the first fabric in the list is placed first in the mold + bool topdown = 3; + repeated SubLaminateMaterialWithAngle materials = 4; + + //read only properties + double area_price = 5; + double thickness = 6; + double area_weight = 7; +} + +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); +} From 874607c4180d2da6e851f264bbb8af5e1b69bcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Roos?= Date: Wed, 16 Aug 2023 13:44:32 +0200 Subject: [PATCH 2/2] rename SubLaminateMaterialWithAngle to Lamina --- src/ansys/api/acp/v0/fabric.proto | 2 +- src/ansys/api/acp/v0/sublaminate.proto | 9 +++++---- src/ansys/api/acp/v0/unit_system.proto | 10 ++++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/ansys/api/acp/v0/fabric.proto b/src/ansys/api/acp/v0/fabric.proto index d0b8a35..c72d316 100644 --- a/src/ansys/api/acp/v0/fabric.proto +++ b/src/ansys/api/acp/v0/fabric.proto @@ -19,7 +19,7 @@ message Properties { base.ResourcePath material = 9; // todo: drop-off and cut-off material links (resource path). - //read only properties + // read only properties double area_weight = 10; } diff --git a/src/ansys/api/acp/v0/sublaminate.proto b/src/ansys/api/acp/v0/sublaminate.proto index 0bd7d9b..4ac0a42 100644 --- a/src/ansys/api/acp/v0/sublaminate.proto +++ b/src/ansys/api/acp/v0/sublaminate.proto @@ -6,21 +6,22 @@ import "ansys/api/acp/v0/enum_types.proto"; import "ansys/api/acp/v0/ply_material.proto"; // Note: material can be of type Fabric or Stackup -message SubLaminateMaterialWithAngle { +message Lamina { base.ResourcePath material = 1; double angle = 2; } -// Note: draping and solid model properties are defined by the fabric and stackup +// Note: draping and solid model properties are defined by the fabric and +// stackup message Properties { // general properties enum_types.StatusType status = 1; ply_material.SymmetryType symmetry = 2; // topdown=True: the first fabric in the list is placed first in the mold bool topdown = 3; - repeated SubLaminateMaterialWithAngle materials = 4; + repeated Lamina materials = 4; - //read only properties + // read only properties double area_price = 5; double thickness = 6; double area_weight = 7; diff --git a/src/ansys/api/acp/v0/unit_system.proto b/src/ansys/api/acp/v0/unit_system.proto index 5d4818c..c711fa0 100644 --- a/src/ansys/api/acp/v0/unit_system.proto +++ b/src/ansys/api/acp/v0/unit_system.proto @@ -12,3 +12,13 @@ enum UnitSystemType { BFT = 6; BIN = 7; } + +enum DimensionType { + DIMENSIONLESS = 0; + LENGTH = 1; + MASS = 2; + FORCE = 3; + TIME = 4; + TEMPERATURE = 5; + CURRENCY = 6; +}