// Proto file representing the EDB Circle class

syntax = "proto3";

package ansys.api.edb.v1;

import "ansys/api/edb/v1/edb_messages.proto";
import "ansys/api/edb/v1/refs.proto";
import "ansys/api/edb/v1/polygon_data.proto";

// Circle service definition
service CircleService {
  // Create a circle
  rpc Create (CircleCreationMessage) returns (EDBObjMessage) {}
  
  // Render Circle
  rpc Render(CircleRenderMessage) returns (PolygonDataMessage) {}

  // Get Parameters
  rpc GetParameters(EDBObjMessage) returns (CircleParametersMessage) {}

  // Set Parameters
  rpc SetParameters(SetCircleParametersMessage) returns (google.protobuf.Empty) {}
}

// Message for Create
message CircleCreationMessage {
  EDBObjMessage layout = 1;
  LayerRefMessage layer = 2;
  NetRefMessage net = 3;
  ValueMessage center_x = 4;
  ValueMessage center_y = 5;
  ValueMessage radius = 6;
}

// Message for Render
message CircleRenderMessage{
  ValueMessage center_x = 1;
  ValueMessage center_y = 2;
  ValueMessage radius = 3;
  bool is_hole = 4;
}

message CircleParametersMessage{
  ValueMessage center_x = 1;
  ValueMessage center_y = 2;
  ValueMessage radius = 3;
}

message SetCircleParametersMessage {
  EDBObjMessage target = 1;
  CircleParametersMessage parameters = 2;
}