Cura.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. //Polygon for previewing where the structures go.
  83. message StructurePolygon {
  84. bytes points = 1; //The vertices of the polygon.
  85. enum Type {
  86. Wall = 0;
  87. Skin = 1;
  88. Infill = 2;
  89. Support = 3;
  90. Combing = 4;
  91. Adhesion = 5;
  92. }
  93. Type type = 2; //Type of structure.
  94. int32 layer_index = 3; //Layer number this is on.
  95. }
  96. message PrintTimeMaterialEstimates { // The print time for each feature and material estimates for the extruder
  97. // Time estimate in each feature
  98. float time_none = 1;
  99. float time_inset_0 = 2;
  100. float time_inset_x = 3;
  101. float time_skin = 4;
  102. float time_support = 5;
  103. float time_skirt = 6;
  104. float time_infill = 7;
  105. float time_support_infill = 8;
  106. float time_travel = 9;
  107. float time_retract = 10;
  108. float time_support_interface = 11;
  109. float time_prime_tower = 12;
  110. repeated MaterialEstimates materialEstimates = 13; // materialEstimates data
  111. }
  112. message MaterialEstimates {
  113. int64 id = 1;
  114. float material_amount = 2; // material used in the extruder
  115. }
  116. message SettingList {
  117. repeated Setting settings = 1;
  118. }
  119. message Setting {
  120. string name = 1; // Internal key to signify a setting
  121. bytes value = 2; // The value of the setting
  122. }
  123. message SettingExtruder {
  124. string name = 1; //The setting key.
  125. int32 extruder = 2; //From which extruder stack the setting should inherit.
  126. }
  127. message GCodePrefix {
  128. bytes data = 2; //Header string to be prepended before the rest of the g-code sent from the engine.
  129. }
  130. message SlicingFinished {
  131. }