Cura.proto 4.5 KB

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