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.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2019 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. #include "point_t.h"
  25. /**
  26. * @brief Nozzle class
  27. *
  28. * @todo: Do not ignore the end.z value and allow XYZ movements
  29. */
  30. class Nozzle {
  31. private:
  32. #if ENABLED(NOZZLE_CLEAN_FEATURE)
  33. /**
  34. * @brief Stroke clean pattern
  35. * @details Wipes the nozzle back and forth in a linear movement
  36. *
  37. * @param start point_t defining the starting point
  38. * @param end point_t defining the ending point
  39. * @param strokes number of strokes to execute
  40. */
  41. static void stroke(const point_t &start, const point_t &end, const uint8_t &strokes) _Os;
  42. /**
  43. * @brief Zig-zag clean pattern
  44. * @details Apply a zig-zag cleaning pattern
  45. *
  46. * @param start point_t defining the starting point
  47. * @param end point_t defining the ending point
  48. * @param strokes number of strokes to execute
  49. * @param objects number of objects to create
  50. */
  51. static void zigzag(const point_t &start, const point_t &end, const uint8_t &strokes, const uint8_t &objects) _Os;
  52. /**
  53. * @brief Circular clean pattern
  54. * @details Apply a circular cleaning pattern
  55. *
  56. * @param start point_t defining the middle of circle
  57. * @param strokes number of strokes to execute
  58. * @param radius radius of circle
  59. */
  60. static void circle(const point_t &start, const point_t &middle, const uint8_t &strokes, const float &radius) _Os;
  61. #endif // NOZZLE_CLEAN_FEATURE
  62. public:
  63. #if ENABLED(NOZZLE_CLEAN_FEATURE)
  64. /**
  65. * @brief Clean the nozzle
  66. * @details Starts the selected clean procedure pattern
  67. *
  68. * @param pattern one of the available patterns
  69. * @param argument depends on the cleaning pattern
  70. */
  71. static void clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects=0) _Os;
  72. #endif // NOZZLE_CLEAN_FEATURE
  73. #if ENABLED(NOZZLE_PARK_FEATURE)
  74. static void park(const uint8_t z_action, const point_t &park=NOZZLE_PARK_POINT) _Os;
  75. #endif
  76. };