// Copyright 2025, ANSYS Inc. Unauthorized use, distribution or duplication is prohibited.
syntax = "proto3";
package ansys.api.dbu.v0;

option csharp_namespace = "Ansys.Api.Dbu.V0";

message EntityIdentifier{
  string id=1;
}

message PhysicsEntityIdentifier{
  string guid_as_string = 1;
}

// Defines the type of location, some conditions support application to either bodies and faces
enum LocationType {
  FACE = 0;
  BODY = 1;
  BOLT = 2;
  SPRING = 3;
  BEAM = 4;
  WELD = 5;
  EDGE = 6;
  AXIS = 7;
}

//
// A driving dimension.
message DrivingDimension {
  string id = 1;
  string name = 2;
  DimensionType dimension_type = 3;
  double dimension_value = 4;
}

message ImportOptionDefinition
{
  oneof option{
    bool bool_option = 1;
    string string_option =2;
  }
}

//
// A design document.
message Design{
  string id = 1;
  bool is_complete=2 ;  
  bool is_locked=3  ;   
  bool is_modified=4;   
  bool is_removed = 5;  
  EntityIdentifier main_part=6;   
  bool main_part_displays_file_name=7; 
  string path = 10;
  string name=11;
}

//
// The type of dimension.
enum DimensionType {
  DIMENSIONTYPE_UNKNOWN = 0;
  DIMENSIONTYPE_LINEAR = 1;
  DIMENSIONTYPE_DIAMETRIC = 2;
  DIMENSIONTYPE_RADIAL = 3;
  DIMENSIONTYPE_ARC = 4;
  DIMENSIONTYPE_AREA = 5;
  DIMENSIONTYPE_VOLUME = 6;
  DIMENSIONTYPE_MASS = 7;
  DIMENSIONTYPE_ANGULAR = 8;
  DIMENSIONTYPE_COUNT = 9;
  DIMENSIONTYPE_UNITLESS = 10;
}

enum ImageFormat {
  IMAGEFORMAT_PNG = 0;
  IMAGEFORMAT_JPEG = 1;
}

enum WindowView {
  WINDOWVIEW_TOP = 0;
  WINDOWVIEW_BOTTOM = 1;
  WINDOWVIEW_LEFT = 2;
  WINDOWVIEW_RIGHT = 3;
  WINDOWVIEW_FRONT = 4;
  WINDOWVIEW_BACK = 5;
  WINDOWVIEW_ISOMETRIC = 6;
  WINDOWVIEW_TRIMETRIC = 7;
  WINDOWVIEW_FIT = 8;
}

enum PartExportFormat {
  PARTEXPORTFORMAT_ACIS_TEXT = 0;
  PARTEXPORTFORMAT_ACIS_BINARY = 1;
  PARTEXPORTFORMAT_PARASOLID_TEXT = 2;
  PARTEXPORTFORMAT_PARASOLID_BINARY = 3;
  PARTEXPORTFORMAT_STEP = 4;
  PARTEXPORTFORMAT_FMD = 5;
  PARTEXPORTFORMAT_IGES = 6;
  PARTEXPORTFORMAT_PMDB = 7;
  PARTEXPORTFORMAT_DISCO = 8;
  PARTEXPORTFORMAT_STRIDE = 9;
  PARTEXPORTFORMAT_SCDOC = 10;
  PARTEXPORTFORMAT_SCDOCX = 11;
  PARTEXPORTFORMAT_JT_OPEN = 12;
  PARTEXPORTFORMAT_VDA = 13;
  PARTEXPORTFORMAT_RHINO = 14;
  PARTEXPORTFORMAT_SKETCH_UP = 15;
  PARTEXPORTFORMAT_PDF_GEOMETRY = 16;
  PARTEXPORTFORMAT_PDF_FACETS = 17;
}

message RequestResult{
  bool success = 1;
  string error_message = 2;
  string internal_error = 3;
}

message VersionIdentifier
{
  int32 major_release = 1;
  int32 minor_release = 2;
  int32 service_pack = 3;
}

enum MonikerCompressionMethod {
  MONIKERCOMPRESSIONMETHOD_FULL = 0;
  MONIKERCOMPRESSIONMETHOD_COMPRESSED = 1;
  MONIKERCOMPRESSIONMETHOD_OBJECT_PATH = 2;
}

enum PersistentIdType {
  PERSISTENTIDTYPE_PNAME = 0;
  PERSISTENTIDTYPE_PRIME_ID = 700;
}

enum BodyExportFormat {
  BODYEXPORTFORMAT_PARASOLID_TEXT = 0;
  BODYEXPORTFORMAT_PARASOLID_BINARY = 1;
}

message Tessellation {
  repeated double vertices = 1;
  repeated int32 faces = 2;
  int32 facecolor = 3;
}

message TessellationOptions{
  double surface_deviation = 1;
  double angle_deviation = 2;
  double maximum_aspect_ratio = 3;
  double maximum_edge_length = 4;
  bool watertight = 5;
  double curve_deviation = 6;
}