Subversion Repositories Tronxy-X3A-Marlin

Rev

Details | Last modification | View Log | RSS feed

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