Cura.proto 3.9 KB

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