Cura.proto 4.6 KB

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