// Proto file representing the EDB Point Data class

syntax = "proto3";

package ansys.api.edb.v1;

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

enum PolySense {
  SENSE_UNKNOWN = 0;
  SENSE_CW = 1;
  SENSE_CCW = 2;
}

service PointDataService {
  rpc Rotate (PointDataRotateMessage) returns (PointMessage) {}
  rpc ClosestPoint (PointDataWithLineMessage) returns (PointMessage) {}
  rpc Distance (PointDataWithLineMessage) returns (google.protobuf.FloatValue) {}
}

message PointMessage {
  ValueMessage x = 1;
  ValueMessage y = 2;
}

message PointsMessage {
  repeated PointMessage points = 1;
}

message PointPropertyMessage {
  EDBObjMessage target = 1;
  PointMessage point = 2;
}

message PointsPropertyMessage {
  EDBObjMessage target = 1;
  repeated PointMessage points = 2;
}

message PointDataRotateMessage {
  PointMessage point = 1;
  PointMessage rotate_center = 2;
  float rotate_angle = 3;
}

message PointPairMessage {
  PointMessage point_0 = 1;
  PointMessage point_1 = 2;
}

message PointPairPropertyMessage {
  PointPairMessage point_pair = 1;
  EDBObjMessage target = 2;
}

message PointDataWithLineMessage {
  PointMessage point = 1;
  PointMessage line_start = 2;
  PointMessage line_end = 3;
}

message BoxMessage {
  PointMessage lower_left = 1;
  PointMessage upper_right = 2;
}

message CircleMessage {
  PointMessage center = 1;
  ValueMessage radius = 2;
}
