My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nozzle.h 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "../inc/MarlinConfig.h"
  24. /**
  25. * @brief Nozzle class
  26. *
  27. * @todo: Do not ignore the end.z value and allow XYZ movements
  28. */
  29. class Nozzle {
  30. private:
  31. #if ENABLED(NOZZLE_CLEAN_FEATURE)
  32. /**
  33. * @brief Stroke clean pattern
  34. * @details Wipes the nozzle back and forth in a linear movement
  35. *
  36. * @param start xyz_pos_t defining the starting point
  37. * @param end xyz_pos_t defining the ending point
  38. * @param strokes number of strokes to execute
  39. */
  40. static void stroke(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes) _Os;
  41. /**
  42. * @brief Zig-zag clean pattern
  43. * @details Apply a zig-zag cleaning pattern
  44. *
  45. * @param start xyz_pos_t defining the starting point
  46. * @param end xyz_pos_t defining the ending point
  47. * @param strokes number of strokes to execute
  48. * @param objects number of objects to create
  49. */
  50. static void zigzag(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes, const uint8_t &objects) _Os;
  51. /**
  52. * @brief Circular clean pattern
  53. * @details Apply a circular cleaning pattern
  54. *
  55. * @param start xyz_pos_t defining the middle of circle
  56. * @param strokes number of strokes to execute
  57. * @param radius radius of circle
  58. */
  59. static void circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const float &radius) _Os;
  60. #endif // NOZZLE_CLEAN_FEATURE
  61. public:
  62. #if ENABLED(NOZZLE_CLEAN_FEATURE)
  63. /**
  64. * @brief Clean the nozzle
  65. * @details Starts the selected clean procedure pattern
  66. *
  67. * @param pattern one of the available patterns
  68. * @param argument depends on the cleaning pattern
  69. */
  70. static void clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects, const uint8_t cleans) _Os;
  71. #endif // NOZZLE_CLEAN_FEATURE
  72. #if ENABLED(NOZZLE_PARK_FEATURE)
  73. static void park(const uint8_t z_action, const xyz_pos_t &park=NOZZLE_PARK_POINT) _Os;
  74. #endif
  75. };
  76. extern Nozzle nozzle;