Nozzle Wipe Vertical Zig-Zag
- Add configuration support for zigzags in either the X or Y axis, for wipe pads significantly longer in one dimension. - Add configuration for default number of zig-zag triangles, vs. a magic number in `Marlin_main.cpp`. - Update description of auto nozzle wiping to match functionality
This commit is contained in:
parent
f17b81b765
commit
48b7e0f8d8
@ -981,13 +981,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1000,6 +1000,7 @@
|
||||
// |________|_________|_________|
|
||||
// T1 T2 T3
|
||||
//
|
||||
//
|
||||
// Caveats: End point Z should use the same value as Start point Z.
|
||||
//
|
||||
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
|
||||
@ -1008,9 +1009,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -3157,7 +3157,7 @@ inline void gcode_G4() {
|
||||
|
||||
uint8_t const pattern = code_seen('P') ? code_value_ushort() : 0;
|
||||
uint8_t const strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES;
|
||||
uint8_t const objects = code_seen('T') ? code_value_ushort() : 3;
|
||||
uint8_t const objects = code_seen('T') ? code_value_ushort() : NOZZLE_CLEAN_TRIANGLES;
|
||||
|
||||
Nozzle::clean(pattern, strokes, objects);
|
||||
}
|
||||
|
@ -981,13 +981,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1008,9 +1008,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -964,13 +964,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -991,9 +991,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -964,13 +964,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -991,9 +991,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -973,13 +973,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1000,9 +1000,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -975,13 +975,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1002,9 +1002,12 @@
|
||||
#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { X_MIN_POS + 10, Y_MAX_POS - 9, (Z_MIN_POS + 0.5)}
|
||||
#define NOZZLE_CLEAN_END_POINT { X_MIN_POS + 90, Y_MAX_POS - 0, (Z_MIN_POS + 0.5)}
|
||||
|
@ -1010,13 +1010,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1037,9 +1037,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -981,13 +981,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1008,9 +1008,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -981,13 +981,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1008,9 +1008,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -981,13 +981,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1008,9 +1008,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -980,13 +980,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1007,9 +1007,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -996,13 +996,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1023,9 +1023,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -1002,13 +1002,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1029,9 +1029,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -973,13 +973,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1000,9 +1000,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -981,13 +981,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1008,9 +1008,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -1068,13 +1068,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1095,9 +1095,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -1071,13 +1071,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1098,9 +1098,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -1070,13 +1070,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1097,9 +1097,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -1074,13 +1074,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1101,9 +1101,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -984,13 +984,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1011,9 +1011,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -977,13 +977,13 @@
|
||||
//
|
||||
// Available list of patterns:
|
||||
// P0: This is the default pattern, this process requires a sponge type
|
||||
// material at a fixed bed location, the cleaning process is based on
|
||||
// "strokes" i.e. back-and-forth movements between the starting and end
|
||||
// points.
|
||||
// material at a fixed bed location. S defines "strokes" i.e.
|
||||
// back-and-forth movements between the starting and end points.
|
||||
//
|
||||
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
|
||||
// defines the number of zig-zag triangles to be done. "S" defines the
|
||||
// number of strokes aka one back-and-forth movement. As an example
|
||||
// number of strokes aka one back-and-forth movement. Zig-zags will
|
||||
// be performed in whichever dimension is smallest. As an example,
|
||||
// sending "G12 P1 S1 T3" will execute:
|
||||
//
|
||||
// --
|
||||
@ -1004,9 +1004,12 @@
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
// Number of pattern repetitions
|
||||
// Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 12
|
||||
|
||||
// Default number of triangles
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3
|
||||
|
||||
// Specify positions as { X, Y, Z }
|
||||
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
|
||||
#define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
|
||||
|
@ -26,6 +26,14 @@
|
||||
#include "Marlin.h"
|
||||
#include "point_t.h"
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
constexpr float nozzle_clean_start_point[4] = NOZZLE_CLEAN_START_POINT,
|
||||
nozzle_clean_end_point[4] = NOZZLE_CLEAN_END_POINT,
|
||||
nozzle_clean_length = fabs(nozzle_clean_start_point[X_AXIS] - nozzle_clean_end_point[X_AXIS]), //abs x size of wipe pad
|
||||
nozzle_clean_height = fabs(nozzle_clean_start_point[Y_AXIS] - nozzle_clean_end_point[Y_AXIS]); //abs y size of wipe pad
|
||||
constexpr bool nozzle_clean_horizontal = nozzle_clean_length >= nozzle_clean_height; //whether to zig-zag horizontally or vertically
|
||||
#endif //NOZZLE_CLEAN_FEATURE
|
||||
|
||||
/**
|
||||
* @brief Nozzle class
|
||||
*
|
||||
@ -92,8 +100,8 @@ class Nozzle {
|
||||
__attribute__((unused)) uint8_t const &objects
|
||||
) __attribute__((optimize ("Os"))) {
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
float A = fabs(end.y - start.y); // [twice the] Amplitude
|
||||
float P = fabs(end.x - start.x) / (objects << 1); // Period
|
||||
float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length; // [twice the] Amplitude
|
||||
float P = ( nozzle_clean_horizontal ? nozzle_clean_length : nozzle_clean_height ) / (objects << 1); // Period
|
||||
|
||||
// Don't allow impossible triangles
|
||||
if (A <= 0.0f || P <= 0.0f ) return;
|
||||
@ -110,16 +118,16 @@ class Nozzle {
|
||||
|
||||
for (uint8_t j = 0; j < strokes; j++) {
|
||||
for (uint8_t i = 0; i < (objects << 1); i++) {
|
||||
float const x = start.x + i * P;
|
||||
float const y = start.y + (A/P) * (P - fabs(fmod((i*P), (2*P)) - P));
|
||||
float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
|
||||
float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
|
||||
|
||||
do_blocking_move_to_xy(x, y);
|
||||
if (i == 0) do_blocking_move_to_z(start.z);
|
||||
}
|
||||
|
||||
for (int i = (objects << 1); i > -1; i--) {
|
||||
float const x = start.x + i * P;
|
||||
float const y = start.y + (A/P) * (P - fabs(fmod((i*P), (2*P)) - P));
|
||||
float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
|
||||
float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
|
||||
|
||||
do_blocking_move_to_xy(x, y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user