Cura.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. }
  56. message LayerOptimized {
  57. int32 id = 1;
  58. float height = 2; // Z position
  59. float thickness = 3; // height of a single layer
  60. repeated PathSegment path_segment = 4; // layer data
  61. }
  62. message PathSegment {
  63. int32 extruder = 1; // The extruder used for this path segment
  64. enum PointType {
  65. Point2D = 0;
  66. Point3D = 1;
  67. }
  68. PointType point_type = 2;
  69. bytes points = 3; // The points defining the line segments, bytes of float[2/3] array of length N+1
  70. 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
  71. bytes line_width = 5; // The widths of the line segments as bytes of a float array of length 1 or N
  72. }
  73. message GCodeLayer {
  74. bytes data = 2;
  75. }
  76. message PrintTimeMaterialEstimates { // The print time for each feature and material estimates for the extruder
  77. // Time estimate in each feature
  78. float time_none = 1;
  79. float time_inset_0 = 2;
  80. float time_inset_x = 3;
  81. float time_skin = 4;
  82. float time_support = 5;
  83. float time_skirt = 6;
  84. float time_infill = 7;
  85. float time_support_infill = 8;
  86. float time_travel = 9;
  87. float time_retract = 10;
  88. float time_support_interface = 11;
  89. repeated MaterialEstimates materialEstimates = 12; // materialEstimates data
  90. }
  91. message MaterialEstimates {
  92. int64 id = 1;
  93. float material_amount = 2; // material used in the extruder
  94. }
  95. message SettingList {
  96. repeated Setting settings = 1;
  97. }
  98. message Setting {
  99. string name = 1; // Internal key to signify a setting
  100. bytes value = 2; // The value of the setting
  101. }
  102. message SettingExtruder {
  103. string name = 1; //The setting key.
  104. int32 extruder = 2; //From which extruder stack the setting should inherit.
  105. }
  106. message GCodePrefix {
  107. bytes data = 2; //Header string to be prepended before the rest of the g-code sent from the engine.
  108. }
  109. message SlicingFinished {
  110. }