Cura.proto 4.8 KB

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