Cura.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. syntax = "proto3";
  2. package cura.proto;
  3. message ObjectList
  4. {
  5. repeated Object objects = 1;
  6. repeated Setting settings = 2; // meshgroup settings (for one-at-a-time printing)
  7. }
  8. message Slice
  9. {
  10. repeated ObjectList object_lists = 1; // The meshgroups to be printed one after another
  11. SettingList global_settings = 2; // The global settings used for the whole print job
  12. repeated Extruder extruders = 3; // The settings sent to each extruder object
  13. }
  14. message Extruder
  15. {
  16. int32 id = 1;
  17. SettingList settings = 2;
  18. }
  19. message Object
  20. {
  21. int64 id = 1;
  22. bytes vertices = 2; //An array of 3 floats.
  23. bytes normals = 3; //An array of 3 floats.
  24. bytes indices = 4; //An array of ints.
  25. repeated Setting settings = 5; // Setting override per object, overruling the global settings.
  26. }
  27. message Progress
  28. {
  29. float amount = 1;
  30. }
  31. message Layer {
  32. int32 id = 1;
  33. float height = 2; // Z position
  34. float thickness = 3; // height of a single layer
  35. repeated Polygon polygons = 4; // layer data
  36. }
  37. message Polygon {
  38. enum Type {
  39. NoneType = 0;
  40. Inset0Type = 1;
  41. InsetXType = 2;
  42. SkinType = 3;
  43. SupportType = 4;
  44. SkirtType = 5;
  45. InfillType = 6;
  46. SupportInfillType = 7;
  47. MoveCombingType = 8;
  48. MoveRetractionType = 9;
  49. }
  50. Type type = 1; // Type of move
  51. bytes points = 2; // The points of the polygon, or two points if only a line segment (Currently only line segments are used)
  52. float line_width = 3; // The width of the line being laid down
  53. }
  54. message LayerOptimized {
  55. int32 id = 1;
  56. float height = 2; // Z position
  57. float thickness = 3; // height of a single layer
  58. repeated PathSegment path_segment = 4; // layer data
  59. }
  60. message PathSegment {
  61. int32 extruder = 1; // The extruder used for this path segment
  62. enum PointType {
  63. Point2D = 0;
  64. Point3D = 1;
  65. }
  66. PointType point_type = 2;
  67. bytes points = 3; // The points defining the line segments, bytes of int64[2/3]? array of length N+1
  68. bytes line_type = 4; // Type of line segment as an unsigned char array of length 1 or N, where N is the number of line segments in this path
  69. bytes line_width = 5; // The widths of the line segments as bytes of a float? array of length 1 or N
  70. }
  71. message GCodeLayer {
  72. bytes data = 2;
  73. }
  74. message PrintTimeMaterialEstimates { // The print time for the whole print and material estimates for the extruder
  75. float time = 1; // Total time estimate
  76. repeated MaterialEstimates materialEstimates = 2; // materialEstimates data
  77. }
  78. message MaterialEstimates {
  79. int64 id = 1;
  80. float material_amount = 2; // material used in the extruder
  81. }
  82. message SettingList {
  83. repeated Setting settings = 1;
  84. }
  85. message Setting {
  86. string name = 1; // Internal key to signify a setting
  87. bytes value = 2; // The value of the setting
  88. }
  89. message GCodePrefix {
  90. bytes data = 2; // Header string to be prenpended before the rest of the gcode sent from the engine
  91. }
  92. message SlicingFinished {
  93. }