From d786fb99e202d2153a082973034cfc69c2bea691 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Nov 2017 00:05:39 -0600 Subject: [PATCH 1/2] Add an option to segment leveled moves --- Marlin/Conditionals_post.h | 6 +- Marlin/Configuration.h | 5 ++ Marlin/Marlin_main.cpp | 113 ++++++++++++++++++++++++++++++------- Marlin/SanityCheck.h | 2 + 4 files changed, 106 insertions(+), 20 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index e16c74ef2..401b83687 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -890,7 +890,7 @@ /** * Set granular options based on the specific type of leveling */ - #define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN))) + #define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(SEGMENT_LEVELED_MOVES))) #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) #define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) #define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID) @@ -905,6 +905,10 @@ #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION)) #endif + #if ENABLED(SEGMENT_LEVELED_MOVES) && !defined(LEVELED_SEGMENT_LENGTH) + #define LEVELED_SEGMENT_LENGTH 5 + #endif + /** * Bed Probing rectangular bounds * These can be further constrained in code for Delta and SCARA diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2d904c750..2f42574eb 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7b0c49dc6..96ab28493 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -12531,7 +12531,81 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { current_position[axis] = cartes[axis]; } -#if ENABLED(MESH_BED_LEVELING) +#if IS_CARTESIAN +#if ENABLED(SEGMENT_LEVELED_MOVES) + + /** + * Prepare a segmented move on a CARTESIAN setup. + * + * This calls planner.buffer_line several times, adding + * small incremental moves. This allows the planner to + * apply more detailed bed leveling to the full move. + */ + inline void segmented_line_to_destination(const float fr_mm_s, const float segment_size=LEVELED_SEGMENT_LENGTH) { + + const float xdiff = destination[X_AXIS] - current_position[X_AXIS], + ydiff = destination[Y_AXIS] - current_position[Y_AXIS]; + + // If the move is only in Z/E don't split up the move + if (!xdiff && !ydiff) { + planner.buffer_line_kinematic(destination, fr_mm_s, active_extruder); + return; + } + + // Remaining cartesian distances + const float zdiff = destination[Z_AXIS] - current_position[Z_AXIS], + ediff = destination[E_AXIS] - current_position[E_AXIS]; + + // Get the linear distance in XYZ + // If the move is very short, check the E move distance + // No E move either? Game over. + float cartesian_mm = SQRT(sq(xdiff) + sq(ydiff) + sq(zdiff)); + if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = FABS(ediff); + if (UNEAR_ZERO(cartesian_mm)) return; + + // The length divided by the segment size + // At least one segment is required + uint16_t segments = cartesian_mm / segment_size; + NOLESS(segments, 1); + + // The approximate length of each segment + const float inv_segments = 1.0 / float(segments), + segment_distance[XYZE] = { + xdiff * inv_segments, + ydiff * inv_segments, + zdiff * inv_segments, + ediff * inv_segments + }; + + // SERIAL_ECHOPAIR("mm=", cartesian_mm); + // SERIAL_ECHOLNPAIR(" segments=", segments); + + // Drop one segment so the last move is to the exact target. + // If there's only 1 segment, loops will be skipped entirely. + --segments; + + // Get the raw current position as starting point + float raw[XYZE]; + COPY(raw, current_position); + + // Calculate and execute the segments + for (uint16_t s = segments + 1; --s;) { + static millis_t next_idle_ms = millis() + 200UL; + thermalManager.manage_heater(); // This returns immediately if not really needed. + if (ELAPSED(millis(), next_idle_ms)) { + next_idle_ms = millis() + 200UL; + idle(); + } + LOOP_XYZE(i) raw[i] += segment_distance[i]; + planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder); + } + + // Since segment_distance is only approximate, + // the final move must be to the exact destination. + planner.buffer_line_kinematic(destination, fr_mm_s, active_extruder); + } + +#elif ENABLED(MESH_BED_LEVELING) /** * Prepare a mesh-leveled linear move in a Cartesian setup, @@ -12592,7 +12666,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { mesh_line_to_destination(fr_mm_s, x_splits, y_splits); } -#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) && !IS_KINEMATIC +#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) #define CELL_INDEX(A,V) ((V - bilinear_start[A##_AXIS]) * ABL_BG_FACTOR(A##_AXIS)) @@ -12656,6 +12730,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { } #endif // AUTO_BED_LEVELING_BILINEAR +#endif // IS_CARTESIAN #if !UBL_DELTA #if IS_KINEMATIC @@ -12674,8 +12749,11 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { // Get the top feedrate of the move in the XY plane const float _feedrate_mm_s = MMS_SCALED(feedrate_mm_s); + const float xdiff = rtarget[X_AXIS] - current_position[X_AXIS], + ydiff = rtarget[Y_AXIS] - current_position[Y_AXIS]; + // If the move is only in Z/E don't split up the move - if (rtarget[X_AXIS] == current_position[X_AXIS] && rtarget[Y_AXIS] == current_position[Y_AXIS]) { + if (!xdiff && !ydiff) { planner.buffer_line_kinematic(rtarget, _feedrate_mm_s, active_extruder); return false; } @@ -12683,21 +12761,15 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { // Fail if attempting move outside printable radius if (!position_is_reachable(rtarget[X_AXIS], rtarget[Y_AXIS])) return true; - // Get the cartesian distances moved in XYZE - const float difference[XYZE] = { - rtarget[X_AXIS] - current_position[X_AXIS], - rtarget[Y_AXIS] - current_position[Y_AXIS], - rtarget[Z_AXIS] - current_position[Z_AXIS], - rtarget[E_AXIS] - current_position[E_AXIS] - }; + // Remaining cartesian distances + const float zdiff = rtarget[Z_AXIS] - current_position[Z_AXIS], + ediff = rtarget[E_AXIS] - current_position[E_AXIS]; // Get the linear distance in XYZ - float cartesian_mm = SQRT(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS])); - // If the move is very short, check the E move distance - if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = FABS(difference[E_AXIS]); - // No E move either? Game over. + float cartesian_mm = SQRT(sq(xdiff) + sq(ydiff) + sq(zdiff)); + if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = FABS(ediff); if (UNEAR_ZERO(cartesian_mm)) return true; // Minimum number of seconds to move the given distance @@ -12718,10 +12790,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { // The approximate length of each segment const float inv_segments = 1.0 / float(segments), segment_distance[XYZE] = { - difference[X_AXIS] * inv_segments, - difference[Y_AXIS] * inv_segments, - difference[Z_AXIS] * inv_segments, - difference[E_AXIS] * inv_segments + xdiff * inv_segments, + ydiff * inv_segments, + zdiff * inv_segments, + ediff * inv_segments }; // SERIAL_ECHOPAIR("mm=", cartesian_mm); @@ -12806,10 +12878,13 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { */ inline bool prepare_move_to_destination_cartesian() { #if HAS_MESH - if (planner.leveling_active) { + if (planner.leveling_active && planner.leveling_active_at_z(destination[Z_AXIS])) { #if ENABLED(AUTO_BED_LEVELING_UBL) ubl.line_to_destination_cartesian(MMS_SCALED(feedrate_mm_s), active_extruder); // UBL's motion routine needs to know about return true; // all moves, including Z-only moves. + #elif ENABLED(SEGMENT_LEVELED_MOVES) + segmented_line_to_destination(MMS_SCALED(feedrate_mm_s)); + return false; #else /** * For MBL and ABL-BILINEAR only segment moves when X or Y are involved. diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 955505ce1..af6032bc3 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -220,6 +220,8 @@ #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY. Please update your configuration." #elif defined(BABYSTEP_ZPROBE_GFX_REVERSE) #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE. Please update your configurations." +#elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN) + #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES. Please update your configuration." #endif /** From 80929c263716e713bdb6a86d1c626b2069594a2b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Nov 2017 15:28:27 -0600 Subject: [PATCH 2/2] Apply SEGMENT_LEVELED_MOVES to example configs --- .../example_configurations/AlephObjects/TAZ4/Configuration.h | 5 +++++ .../example_configurations/AliExpress/CL-260/Configuration.h | 5 +++++ Marlin/example_configurations/Anet/A6/Configuration.h | 5 +++++ Marlin/example_configurations/Anet/A8/Configuration.h | 5 +++++ Marlin/example_configurations/BQ/Hephestos/Configuration.h | 5 +++++ Marlin/example_configurations/BQ/Hephestos_2/Configuration.h | 5 +++++ Marlin/example_configurations/BQ/WITBOX/Configuration.h | 5 +++++ Marlin/example_configurations/Cartesio/Configuration.h | 5 +++++ Marlin/example_configurations/Creality/CR-10/Configuration.h | 5 +++++ Marlin/example_configurations/Felix/Configuration.h | 5 +++++ Marlin/example_configurations/Felix/DUAL/Configuration.h | 5 +++++ .../FolgerTech/i3-2020/Configuration.h | 5 +++++ .../example_configurations/Geeetech/GT2560/Configuration.h | 5 +++++ .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 5 +++++ .../example_configurations/Infitary/i3-M508/Configuration.h | 5 +++++ Marlin/example_configurations/Malyan/M150/Configuration.h | 5 +++++ .../Micromake/C1/basic/Configuration.h | 5 +++++ .../Micromake/C1/enhanced/Configuration.h | 5 +++++ .../RepRapWorld/Megatronics/Configuration.h | 5 +++++ Marlin/example_configurations/RigidBot/Configuration.h | 5 +++++ Marlin/example_configurations/SCARA/Configuration.h | 5 +++++ Marlin/example_configurations/Sanguinololu/Configuration.h | 5 +++++ Marlin/example_configurations/TinyBoy2/Configuration.h | 5 +++++ Marlin/example_configurations/Velleman/K8200/Configuration.h | 5 +++++ Marlin/example_configurations/Velleman/K8400/Configuration.h | 5 +++++ .../Velleman/K8400/Dual-head/Configuration.h | 5 +++++ .../example_configurations/adafruit/ST7565/Configuration.h | 5 +++++ .../delta/FLSUN/auto_calibrate/Configuration.h | 5 +++++ .../delta/FLSUN/kossel_mini/Configuration.h | 5 +++++ Marlin/example_configurations/delta/generic/Configuration.h | 5 +++++ .../example_configurations/delta/kossel_mini/Configuration.h | 5 +++++ .../example_configurations/delta/kossel_pro/Configuration.h | 5 +++++ .../example_configurations/delta/kossel_xl/Configuration.h | 5 +++++ .../example_configurations/gCreate/gMax1.5+/Configuration.h | 5 +++++ Marlin/example_configurations/makibox/Configuration.h | 5 +++++ Marlin/example_configurations/tvrrug/Round2/Configuration.h | 5 +++++ Marlin/example_configurations/wt150/Configuration.h | 5 +++++ 37 files changed, 185 insertions(+) diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 0c81a7e6b..720e61dbc 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -911,6 +911,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 3d9917255..f2128a5a3 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 0e2719602..645ceed3c 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -1010,6 +1010,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index e07619c4d..0c3ec7495 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -898,6 +898,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index f89cb0524..7a84db5ce 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -882,6 +882,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index abc6e999d..507dd1e4f 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -892,6 +892,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 133cb5bad..e63ef2436 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -882,6 +882,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index fbca8e746..21a7ddca2 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -890,6 +890,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index 8fb54b953..f1ded1bba 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -901,6 +901,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 7ea899199..4709d670e 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -873,6 +873,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 02a3aca33..e61a3112c 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -873,6 +873,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index 0f36066f3..df2e28119 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -894,6 +894,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index 7567c55cf..fff1c2a03 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -906,6 +906,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index 45593d25d..37f5f2c08 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index a76b90928..0a53e7313 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -895,6 +895,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index 7430c5639..1cd035f6d 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -919,6 +919,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index 05b99b94a..405e7a483 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -895,6 +895,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index 5ce15e101..12ad45aa0 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -895,6 +895,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 6de0cc32e..7aebdf83f 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 20224c1ec..deb63d0c4 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -889,6 +889,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index e3b7a68df..292173a39 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -903,6 +903,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 6001c5e13..41dddfe92 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -922,6 +922,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 1d36944fe..a1c31e90c 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -947,6 +947,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index a354d400e..05f6ff95d 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -921,6 +921,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index 80d02cabe..73c167dbe 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index 442c1e6ab..69029c1ef 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 60767851b..16bfe36eb 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -891,6 +891,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 4783d7493..7848d255b 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -1021,6 +1021,11 @@ // The height can be set with M420 Z //#define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index b9c798939..8763de701 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -1021,6 +1021,11 @@ // The height can be set with M420 Z //#define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 9f389562d..1496747d7 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1012,6 +1012,11 @@ #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 7fb0ad192..c478f7109 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1015,6 +1015,11 @@ #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 7b4803da4..6f77d0391 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1015,6 +1015,11 @@ #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 5bc6cc635..31a037fca 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1024,6 +1024,11 @@ #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index cab69badf..a2a06f664 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -905,6 +905,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 86c099950..a4cf8b35e 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -894,6 +894,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index a6b8e3a13..f65bd9682 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -886,6 +886,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */ diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 79150d3c1..4ae19eb45 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -896,6 +896,11 @@ // The height can be set with M420 Z #define ENABLE_LEVELING_FADE_HEIGHT + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + /** * Enable the G26 Mesh Validation Pattern tool. */