Cura.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. repeated SettingExtruder limit_to_extruder = 4; // From which stack the setting would inherit if not defined per object
  14. }
  15. message Extruder
  16. {
  17. int32 id = 1;
  18. SettingList settings = 2;
  19. }
  20. message Object
  21. {
  22. int64 id = 1;
  23. bytes vertices = 2; //An array of 3 floats.
  24. bytes normals = 3; //An array of 3 floats.
  25. bytes indices = 4; //An array of ints.
  26. repeated Setting settings = 5; // Setting override per object, overruling the global settings.
  27. string name = 6; //Mesh name
  28. }
  29. message Progress
  30. {
  31. float amount = 1;
  32. }
  33. message Layer {
  34. int32 id = 1;
  35. float height = 2; // Z position
  36. float thickness = 3; // height of a single layer
  37. repeated Polygon polygons = 4; // layer data
  38. }
  39. message Polygon {
  40. enum Type {
  41. NoneType = 0;
  42. Inset0Type = 1;
  43. InsetXType = 2;
  44. SkinType = 3;
  45. SupportType = 4;
  46. SkirtType = 5;
  47. InfillType = 6;
  48. SupportInfillType = 7;
  49. MoveCombingType = 8;
  50. MoveRetractionType = 9;
  51. SupportInterfaceType = 10;
  52. PrimeTowerType = 11;
  53. }
  54. Type type = 1; // Type of move
  55. bytes points = 2; // The points of the polygon, or two points if only a line segment (Currently only line segments are used)
  56. float line_width = 3; // The width of the line being laid down
  57. float line_thickness = 4; // The thickness of the line being laid down
  58. float line_feedrate = 5; // The feedrate of the line being laid down
  59. }
  60. message LayerOptimized {
  61. int32 id = 1;
  62. float height = 2; // Z position
  63. float thickness = 3; // height of a single layer
  64. repeated PathSegment path_segment = 4; // layer data
  65. }
  66. message PathSegment {
  67. int32 extruder = 1; // The extruder used for this path segment
  68. enum PointType {
  69. Point2D = 0;
  70. Point3D = 1;
  71. }
  72. PointType point_type = 2;
  73. bytes points = 3; // The points defining the line segments, bytes of float[2/3] array of length N+1
  74. 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
  75. bytes line_width = 5; // The widths of the line segments as bytes of a float array of length 1 or N
  76. bytes line_thickness = 6; // The thickness of the line segments as bytes of a float array of length 1 or N
  77. bytes line_feedrate = 7; // The feedrate of the line segments as bytes of a float array of length 1 or N
  78. }
  79. message GCodeLayer {
  80. bytes data = 2;
  81. }
  82. message PrintTimeMaterialEstimates { // The print time for each feature and material estimates for the extruder
  83. // Time estimate in each feature
  84. float time_none = 1;
  85. float time_inset_0 = 2;
  86. float time_inset_x = 3;
  87. float time_skin = 4;
  88. float time_support = 5;
  89. float time_skirt = 6;
  90. float time_infill = 7;
  91. float time_support_infill = 8;
  92. float time_travel = 9;
  93. float time_retract = 10;
  94. float time_support_interface = 11;
  95. float time_prime_tower = 12;
  96. repeated MaterialEstimates materialEstimates = 13; // materialEstimates data
  97. }
  98. message MaterialEstimates {
  99. int64 id = 1;
  100. float material_amount = 2; // material used in the extruder
  101. }
  102. message SettingList {
  103. repeated Setting settings = 1;
  104. }
  105. message Setting {
  106. string name = 1; // Internal key to signify a setting
  107. bytes value = 2; // The value of the setting
  108. }
  109. message SettingExtruder {
  110. string name = 1; //The setting key.
  111. int32 extruder = 2; //From which extruder stack the setting should inherit.
  112. }
  113. message GCodePrefix {
  114. bytes data = 2; //Header string to be prepended before the rest of the g-code sent from the engine.
  115. }
  116. message SlicingFinished {
  117. }