Parcourir la source

Merge pull request #8624 from thinkyhead/bf2_skew_correction

[2.0] Skew Correction
Scott Lahteine il y a 7 ans
Parent
révision
98aba6a534
Aucun compte lié à l'adresse e-mail de l'auteur
56 fichiers modifiés avec 2827 ajouts et 85 suppressions
  1. 1
    1
      .travis.yml
  2. 58
    1
      Marlin/Configuration.h
  3. 58
    1
      Marlin/src/config/default/Configuration.h
  4. 58
    1
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  5. 58
    1
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  6. 58
    1
      Marlin/src/config/examples/Anet/A6/Configuration.h
  7. 58
    1
      Marlin/src/config/examples/Anet/A8/Configuration.h
  8. 58
    1
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  9. 58
    1
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  10. 58
    1
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  11. 58
    1
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  12. 58
    1
      Marlin/src/config/examples/Cartesio/Configuration.h
  13. 58
    1
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  14. 58
    1
      Marlin/src/config/examples/Felix/Configuration.h
  15. 58
    1
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  16. 58
    1
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  17. 58
    1
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  18. 58
    1
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  19. 58
    1
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  20. 58
    1
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  21. 58
    1
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  22. 58
    1
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  23. 58
    1
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  24. 58
    1
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  25. 58
    1
      Marlin/src/config/examples/RigidBot/Configuration.h
  26. 58
    1
      Marlin/src/config/examples/SCARA/Configuration.h
  27. 58
    1
      Marlin/src/config/examples/STM32F10/Configuration.h
  28. 58
    1
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  29. 58
    1
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  30. 58
    1
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  31. 58
    1
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  32. 58
    1
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  33. 58
    1
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  34. 58
    1
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  35. 58
    1
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  36. 58
    1
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  37. 58
    1
      Marlin/src/config/examples/delta/generic/Configuration.h
  38. 58
    1
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  39. 58
    1
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  40. 58
    1
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  41. 58
    1
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  42. 58
    1
      Marlin/src/config/examples/makibox/Configuration.h
  43. 58
    1
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  44. 58
    1
      Marlin/src/config/examples/wt150/Configuration.h
  45. 3
    1
      Marlin/src/core/language.h
  46. 89
    0
      Marlin/src/gcode/calibrate/M852.cpp
  47. 6
    0
      Marlin/src/gcode/gcode.cpp
  48. 5
    0
      Marlin/src/gcode/gcode.h
  49. 43
    0
      Marlin/src/inc/Conditionals_post.h
  50. 14
    0
      Marlin/src/inc/SanityCheck.h
  51. 3
    0
      Marlin/src/lcd/language/language_en.h
  52. 69
    4
      Marlin/src/module/configuration_store.cpp
  53. 81
    34
      Marlin/src/module/planner.cpp
  54. 17
    0
      Marlin/src/module/planner.h
  55. 1
    1
      Marlin/src/module/temperature.cpp
  56. 1
    1
      Marlin/src/module/temperature.h

+ 1
- 1
.travis.yml Voir le fichier

@@ -62,7 +62,7 @@ script:
62 62
   - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
63 63
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
64 64
   - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
65
-  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
65
+  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
66 66
   - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
67 67
   - opt_set ABL_GRID_POINTS_X 16
68 68
   - opt_set ABL_GRID_POINTS_Y 16

+ 58
- 1
Marlin/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/default/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h Voir le fichier

@@ -852,7 +852,7 @@
852 852
 //===========================================================================
853 853
 //=============================== Bed Leveling ==============================
854 854
 //===========================================================================
855
-// @section bedlevel
855
+// @section calibrate
856 856
 
857 857
 /**
858 858
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1059,6 +1059,63 @@
1059 1059
 #define HOMING_FEEDRATE_XY (50*60)
1060 1060
 #define HOMING_FEEDRATE_Z  (8*60)
1061 1061
 
1062
+// @section calibrate
1063
+
1064
+/**
1065
+ * Bed Skew Compensation
1066
+ *
1067
+ * This feature corrects for misalignment in the XYZ axes.
1068
+ *
1069
+ * Take the following steps to get the bed skew in the XY plane:
1070
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1071
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1072
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1073
+ *  4. For XY_SIDE_AD measure the edge A to D
1074
+ *
1075
+ * Marlin automatically computes skew factors from these measurements.
1076
+ * Skew factors may also be computed and set manually:
1077
+ *
1078
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1079
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1080
+ *
1081
+ * If desired, follow the same procedure for XZ and YZ.
1082
+ * Use these diagrams for reference:
1083
+ *
1084
+ *    Y                     Z                     Z
1085
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1086
+ *    |    /       /        |    /       /        |    /       /
1087
+ *    |   /       /         |   /       /         |   /       /
1088
+ *    |  A-------D          |  A-------D          |  A-------D
1089
+ *    +-------------->X     +-------------->X     +-------------->Y
1090
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1091
+ */
1092
+//#define SKEW_CORRECTION
1093
+
1094
+#if ENABLED(SKEW_CORRECTION)
1095
+  // Input all length measurements here:
1096
+  #define XY_DIAG_AC 282.8427124746
1097
+  #define XY_DIAG_BD 282.8427124746
1098
+  #define XY_SIDE_AD 200
1099
+
1100
+  // Or, set the default skew factors directly here
1101
+  // to override the above measurements:
1102
+  #define XY_SKEW_FACTOR 0.0
1103
+
1104
+  //#define SKEW_CORRECTION_FOR_Z
1105
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1106
+    #define XZ_DIAG_AC 282.8427124746
1107
+    #define XZ_DIAG_BD 282.8427124746
1108
+    #define YZ_DIAG_AC 282.8427124746
1109
+    #define YZ_DIAG_BD 282.8427124746
1110
+    #define YZ_SIDE_AD 200
1111
+    #define XZ_SKEW_FACTOR 0.0
1112
+    #define YZ_SKEW_FACTOR 0.0
1113
+  #endif
1114
+
1115
+  // Enable this option for M852 to set skew at runtime
1116
+  //#define SKEW_CORRECTION_GCODE
1117
+#endif
1118
+
1062 1119
 //=============================================================================
1063 1120
 //============================= Additional Features ===========================
1064 1121
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Anet/A6/Configuration.h Voir le fichier

@@ -951,7 +951,7 @@
951 951
 //===========================================================================
952 952
 //=============================== Bed Leveling ==============================
953 953
 //===========================================================================
954
-// @section bedlevel
954
+// @section calibrate
955 955
 
956 956
 /**
957 957
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1196,6 +1196,63 @@
1196 1196
 #define HOMING_FEEDRATE_XY (50*60)
1197 1197
 #define HOMING_FEEDRATE_Z  (4*60)
1198 1198
 
1199
+// @section calibrate
1200
+
1201
+/**
1202
+ * Bed Skew Compensation
1203
+ *
1204
+ * This feature corrects for misalignment in the XYZ axes.
1205
+ *
1206
+ * Take the following steps to get the bed skew in the XY plane:
1207
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1208
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1209
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1210
+ *  4. For XY_SIDE_AD measure the edge A to D
1211
+ *
1212
+ * Marlin automatically computes skew factors from these measurements.
1213
+ * Skew factors may also be computed and set manually:
1214
+ *
1215
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1216
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1217
+ *
1218
+ * If desired, follow the same procedure for XZ and YZ.
1219
+ * Use these diagrams for reference:
1220
+ *
1221
+ *    Y                     Z                     Z
1222
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1223
+ *    |    /       /        |    /       /        |    /       /
1224
+ *    |   /       /         |   /       /         |   /       /
1225
+ *    |  A-------D          |  A-------D          |  A-------D
1226
+ *    +-------------->X     +-------------->X     +-------------->Y
1227
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1228
+ */
1229
+//#define SKEW_CORRECTION
1230
+
1231
+#if ENABLED(SKEW_CORRECTION)
1232
+  // Input all length measurements here:
1233
+  #define XY_DIAG_AC 282.8427124746
1234
+  #define XY_DIAG_BD 282.8427124746
1235
+  #define XY_SIDE_AD 200
1236
+
1237
+  // Or, set the default skew factors directly here
1238
+  // to override the above measurements:
1239
+  #define XY_SKEW_FACTOR 0.0
1240
+
1241
+  //#define SKEW_CORRECTION_FOR_Z
1242
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1243
+    #define XZ_DIAG_AC 282.8427124746
1244
+    #define XZ_DIAG_BD 282.8427124746
1245
+    #define YZ_DIAG_AC 282.8427124746
1246
+    #define YZ_DIAG_BD 282.8427124746
1247
+    #define YZ_SIDE_AD 200
1248
+    #define XZ_SKEW_FACTOR 0.0
1249
+    #define YZ_SKEW_FACTOR 0.0
1250
+  #endif
1251
+
1252
+  // Enable this option for M852 to set skew at runtime
1253
+  //#define SKEW_CORRECTION_GCODE
1254
+#endif
1255
+
1199 1256
 //=============================================================================
1200 1257
 //============================= Additional Features ===========================
1201 1258
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Anet/A8/Configuration.h Voir le fichier

@@ -838,7 +838,7 @@
838 838
 //===========================================================================
839 839
 //=============================== Bed Leveling ==============================
840 840
 //===========================================================================
841
-// @section bedlevel
841
+// @section calibrate
842 842
 
843 843
 /**
844 844
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1045,6 +1045,63 @@
1045 1045
 #define HOMING_FEEDRATE_XY (100*60)
1046 1046
 #define HOMING_FEEDRATE_Z  (4*60)
1047 1047
 
1048
+// @section calibrate
1049
+
1050
+/**
1051
+ * Bed Skew Compensation
1052
+ *
1053
+ * This feature corrects for misalignment in the XYZ axes.
1054
+ *
1055
+ * Take the following steps to get the bed skew in the XY plane:
1056
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1057
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1058
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1059
+ *  4. For XY_SIDE_AD measure the edge A to D
1060
+ *
1061
+ * Marlin automatically computes skew factors from these measurements.
1062
+ * Skew factors may also be computed and set manually:
1063
+ *
1064
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1065
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1066
+ *
1067
+ * If desired, follow the same procedure for XZ and YZ.
1068
+ * Use these diagrams for reference:
1069
+ *
1070
+ *    Y                     Z                     Z
1071
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1072
+ *    |    /       /        |    /       /        |    /       /
1073
+ *    |   /       /         |   /       /         |   /       /
1074
+ *    |  A-------D          |  A-------D          |  A-------D
1075
+ *    +-------------->X     +-------------->X     +-------------->Y
1076
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1077
+ */
1078
+//#define SKEW_CORRECTION
1079
+
1080
+#if ENABLED(SKEW_CORRECTION)
1081
+  // Input all length measurements here:
1082
+  #define XY_DIAG_AC 282.8427124746
1083
+  #define XY_DIAG_BD 282.8427124746
1084
+  #define XY_SIDE_AD 200
1085
+
1086
+  // Or, set the default skew factors directly here
1087
+  // to override the above measurements:
1088
+  #define XY_SKEW_FACTOR 0.0
1089
+
1090
+  //#define SKEW_CORRECTION_FOR_Z
1091
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1092
+    #define XZ_DIAG_AC 282.8427124746
1093
+    #define XZ_DIAG_BD 282.8427124746
1094
+    #define YZ_DIAG_AC 282.8427124746
1095
+    #define YZ_DIAG_BD 282.8427124746
1096
+    #define YZ_SIDE_AD 200
1097
+    #define XZ_SKEW_FACTOR 0.0
1098
+    #define YZ_SKEW_FACTOR 0.0
1099
+  #endif
1100
+
1101
+  // Enable this option for M852 to set skew at runtime
1102
+  //#define SKEW_CORRECTION_GCODE
1103
+#endif
1104
+
1048 1105
 //=============================================================================
1049 1106
 //============================= Additional Features ===========================
1050 1107
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/BQ/Hephestos/Configuration.h Voir le fichier

@@ -823,7 +823,7 @@
823 823
 //===========================================================================
824 824
 //=============================== Bed Leveling ==============================
825 825
 //===========================================================================
826
-// @section bedlevel
826
+// @section calibrate
827 827
 
828 828
 /**
829 829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1030,6 +1030,63 @@
1030 1030
 #define HOMING_FEEDRATE_XY 2000
1031 1031
 #define HOMING_FEEDRATE_Z  150
1032 1032
 
1033
+// @section calibrate
1034
+
1035
+/**
1036
+ * Bed Skew Compensation
1037
+ *
1038
+ * This feature corrects for misalignment in the XYZ axes.
1039
+ *
1040
+ * Take the following steps to get the bed skew in the XY plane:
1041
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1042
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1043
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1044
+ *  4. For XY_SIDE_AD measure the edge A to D
1045
+ *
1046
+ * Marlin automatically computes skew factors from these measurements.
1047
+ * Skew factors may also be computed and set manually:
1048
+ *
1049
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1050
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1051
+ *
1052
+ * If desired, follow the same procedure for XZ and YZ.
1053
+ * Use these diagrams for reference:
1054
+ *
1055
+ *    Y                     Z                     Z
1056
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1057
+ *    |    /       /        |    /       /        |    /       /
1058
+ *    |   /       /         |   /       /         |   /       /
1059
+ *    |  A-------D          |  A-------D          |  A-------D
1060
+ *    +-------------->X     +-------------->X     +-------------->Y
1061
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1062
+ */
1063
+//#define SKEW_CORRECTION
1064
+
1065
+#if ENABLED(SKEW_CORRECTION)
1066
+  // Input all length measurements here:
1067
+  #define XY_DIAG_AC 282.8427124746
1068
+  #define XY_DIAG_BD 282.8427124746
1069
+  #define XY_SIDE_AD 200
1070
+
1071
+  // Or, set the default skew factors directly here
1072
+  // to override the above measurements:
1073
+  #define XY_SKEW_FACTOR 0.0
1074
+
1075
+  //#define SKEW_CORRECTION_FOR_Z
1076
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1077
+    #define XZ_DIAG_AC 282.8427124746
1078
+    #define XZ_DIAG_BD 282.8427124746
1079
+    #define YZ_DIAG_AC 282.8427124746
1080
+    #define YZ_DIAG_BD 282.8427124746
1081
+    #define YZ_SIDE_AD 200
1082
+    #define XZ_SKEW_FACTOR 0.0
1083
+    #define YZ_SKEW_FACTOR 0.0
1084
+  #endif
1085
+
1086
+  // Enable this option for M852 to set skew at runtime
1087
+  //#define SKEW_CORRECTION_GCODE
1088
+#endif
1089
+
1033 1090
 //=============================================================================
1034 1091
 //============================= Additional Features ===========================
1035 1092
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h Voir le fichier

@@ -833,7 +833,7 @@
833 833
 //===========================================================================
834 834
 //=============================== Bed Leveling ==============================
835 835
 //===========================================================================
836
-// @section bedlevel
836
+// @section calibrate
837 837
 
838 838
 /**
839 839
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1040,6 +1040,63 @@
1040 1040
 #define HOMING_FEEDRATE_XY (60*60)
1041 1041
 #define HOMING_FEEDRATE_Z  120
1042 1042
 
1043
+// @section calibrate
1044
+
1045
+/**
1046
+ * Bed Skew Compensation
1047
+ *
1048
+ * This feature corrects for misalignment in the XYZ axes.
1049
+ *
1050
+ * Take the following steps to get the bed skew in the XY plane:
1051
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1052
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1053
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1054
+ *  4. For XY_SIDE_AD measure the edge A to D
1055
+ *
1056
+ * Marlin automatically computes skew factors from these measurements.
1057
+ * Skew factors may also be computed and set manually:
1058
+ *
1059
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1060
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1061
+ *
1062
+ * If desired, follow the same procedure for XZ and YZ.
1063
+ * Use these diagrams for reference:
1064
+ *
1065
+ *    Y                     Z                     Z
1066
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1067
+ *    |    /       /        |    /       /        |    /       /
1068
+ *    |   /       /         |   /       /         |   /       /
1069
+ *    |  A-------D          |  A-------D          |  A-------D
1070
+ *    +-------------->X     +-------------->X     +-------------->Y
1071
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1072
+ */
1073
+//#define SKEW_CORRECTION
1074
+
1075
+#if ENABLED(SKEW_CORRECTION)
1076
+  // Input all length measurements here:
1077
+  #define XY_DIAG_AC 282.8427124746
1078
+  #define XY_DIAG_BD 282.8427124746
1079
+  #define XY_SIDE_AD 200
1080
+
1081
+  // Or, set the default skew factors directly here
1082
+  // to override the above measurements:
1083
+  #define XY_SKEW_FACTOR 0.0
1084
+
1085
+  //#define SKEW_CORRECTION_FOR_Z
1086
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1087
+    #define XZ_DIAG_AC 282.8427124746
1088
+    #define XZ_DIAG_BD 282.8427124746
1089
+    #define YZ_DIAG_AC 282.8427124746
1090
+    #define YZ_DIAG_BD 282.8427124746
1091
+    #define YZ_SIDE_AD 200
1092
+    #define XZ_SKEW_FACTOR 0.0
1093
+    #define YZ_SKEW_FACTOR 0.0
1094
+  #endif
1095
+
1096
+  // Enable this option for M852 to set skew at runtime
1097
+  //#define SKEW_CORRECTION_GCODE
1098
+#endif
1099
+
1043 1100
 //=============================================================================
1044 1101
 //============================= Additional Features ===========================
1045 1102
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/BQ/WITBOX/Configuration.h Voir le fichier

@@ -823,7 +823,7 @@
823 823
 //===========================================================================
824 824
 //=============================== Bed Leveling ==============================
825 825
 //===========================================================================
826
-// @section bedlevel
826
+// @section calibrate
827 827
 
828 828
 /**
829 829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1030,6 +1030,63 @@
1030 1030
 #define HOMING_FEEDRATE_XY (120*60)
1031 1031
 #define HOMING_FEEDRATE_Z  432
1032 1032
 
1033
+// @section calibrate
1034
+
1035
+/**
1036
+ * Bed Skew Compensation
1037
+ *
1038
+ * This feature corrects for misalignment in the XYZ axes.
1039
+ *
1040
+ * Take the following steps to get the bed skew in the XY plane:
1041
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1042
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1043
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1044
+ *  4. For XY_SIDE_AD measure the edge A to D
1045
+ *
1046
+ * Marlin automatically computes skew factors from these measurements.
1047
+ * Skew factors may also be computed and set manually:
1048
+ *
1049
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1050
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1051
+ *
1052
+ * If desired, follow the same procedure for XZ and YZ.
1053
+ * Use these diagrams for reference:
1054
+ *
1055
+ *    Y                     Z                     Z
1056
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1057
+ *    |    /       /        |    /       /        |    /       /
1058
+ *    |   /       /         |   /       /         |   /       /
1059
+ *    |  A-------D          |  A-------D          |  A-------D
1060
+ *    +-------------->X     +-------------->X     +-------------->Y
1061
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1062
+ */
1063
+//#define SKEW_CORRECTION
1064
+
1065
+#if ENABLED(SKEW_CORRECTION)
1066
+  // Input all length measurements here:
1067
+  #define XY_DIAG_AC 282.8427124746
1068
+  #define XY_DIAG_BD 282.8427124746
1069
+  #define XY_SIDE_AD 200
1070
+
1071
+  // Or, set the default skew factors directly here
1072
+  // to override the above measurements:
1073
+  #define XY_SKEW_FACTOR 0.0
1074
+
1075
+  //#define SKEW_CORRECTION_FOR_Z
1076
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1077
+    #define XZ_DIAG_AC 282.8427124746
1078
+    #define XZ_DIAG_BD 282.8427124746
1079
+    #define YZ_DIAG_AC 282.8427124746
1080
+    #define YZ_DIAG_BD 282.8427124746
1081
+    #define YZ_SIDE_AD 200
1082
+    #define XZ_SKEW_FACTOR 0.0
1083
+    #define YZ_SKEW_FACTOR 0.0
1084
+  #endif
1085
+
1086
+  // Enable this option for M852 to set skew at runtime
1087
+  //#define SKEW_CORRECTION_GCODE
1088
+#endif
1089
+
1033 1090
 //=============================================================================
1034 1091
 //============================= Additional Features ===========================
1035 1092
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Cartesio/Configuration.h Voir le fichier

@@ -831,7 +831,7 @@
831 831
 //===========================================================================
832 832
 //=============================== Bed Leveling ==============================
833 833
 //===========================================================================
834
-// @section bedlevel
834
+// @section calibrate
835 835
 
836 836
 /**
837 837
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1038,6 +1038,63 @@
1038 1038
 #define HOMING_FEEDRATE_XY (50*60)
1039 1039
 #define HOMING_FEEDRATE_Z  (10*60)
1040 1040
 
1041
+// @section calibrate
1042
+
1043
+/**
1044
+ * Bed Skew Compensation
1045
+ *
1046
+ * This feature corrects for misalignment in the XYZ axes.
1047
+ *
1048
+ * Take the following steps to get the bed skew in the XY plane:
1049
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1050
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1051
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1052
+ *  4. For XY_SIDE_AD measure the edge A to D
1053
+ *
1054
+ * Marlin automatically computes skew factors from these measurements.
1055
+ * Skew factors may also be computed and set manually:
1056
+ *
1057
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1058
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1059
+ *
1060
+ * If desired, follow the same procedure for XZ and YZ.
1061
+ * Use these diagrams for reference:
1062
+ *
1063
+ *    Y                     Z                     Z
1064
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1065
+ *    |    /       /        |    /       /        |    /       /
1066
+ *    |   /       /         |   /       /         |   /       /
1067
+ *    |  A-------D          |  A-------D          |  A-------D
1068
+ *    +-------------->X     +-------------->X     +-------------->Y
1069
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1070
+ */
1071
+//#define SKEW_CORRECTION
1072
+
1073
+#if ENABLED(SKEW_CORRECTION)
1074
+  // Input all length measurements here:
1075
+  #define XY_DIAG_AC 282.8427124746
1076
+  #define XY_DIAG_BD 282.8427124746
1077
+  #define XY_SIDE_AD 200
1078
+
1079
+  // Or, set the default skew factors directly here
1080
+  // to override the above measurements:
1081
+  #define XY_SKEW_FACTOR 0.0
1082
+
1083
+  //#define SKEW_CORRECTION_FOR_Z
1084
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1085
+    #define XZ_DIAG_AC 282.8427124746
1086
+    #define XZ_DIAG_BD 282.8427124746
1087
+    #define YZ_DIAG_AC 282.8427124746
1088
+    #define YZ_DIAG_BD 282.8427124746
1089
+    #define YZ_SIDE_AD 200
1090
+    #define XZ_SKEW_FACTOR 0.0
1091
+    #define YZ_SKEW_FACTOR 0.0
1092
+  #endif
1093
+
1094
+  // Enable this option for M852 to set skew at runtime
1095
+  //#define SKEW_CORRECTION_GCODE
1096
+#endif
1097
+
1041 1098
 //=============================================================================
1042 1099
 //============================= Additional Features ===========================
1043 1100
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Creality/CR-10/Configuration.h Voir le fichier

@@ -842,7 +842,7 @@
842 842
 //===========================================================================
843 843
 //=============================== Bed Leveling ==============================
844 844
 //===========================================================================
845
-// @section bedlevel
845
+// @section calibrate
846 846
 
847 847
 /**
848 848
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1049,6 +1049,63 @@
1049 1049
 #define HOMING_FEEDRATE_XY (50*60)
1050 1050
 #define HOMING_FEEDRATE_Z  (4*60)
1051 1051
 
1052
+// @section calibrate
1053
+
1054
+/**
1055
+ * Bed Skew Compensation
1056
+ *
1057
+ * This feature corrects for misalignment in the XYZ axes.
1058
+ *
1059
+ * Take the following steps to get the bed skew in the XY plane:
1060
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1061
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1062
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1063
+ *  4. For XY_SIDE_AD measure the edge A to D
1064
+ *
1065
+ * Marlin automatically computes skew factors from these measurements.
1066
+ * Skew factors may also be computed and set manually:
1067
+ *
1068
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1069
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1070
+ *
1071
+ * If desired, follow the same procedure for XZ and YZ.
1072
+ * Use these diagrams for reference:
1073
+ *
1074
+ *    Y                     Z                     Z
1075
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1076
+ *    |    /       /        |    /       /        |    /       /
1077
+ *    |   /       /         |   /       /         |   /       /
1078
+ *    |  A-------D          |  A-------D          |  A-------D
1079
+ *    +-------------->X     +-------------->X     +-------------->Y
1080
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1081
+ */
1082
+//#define SKEW_CORRECTION
1083
+
1084
+#if ENABLED(SKEW_CORRECTION)
1085
+  // Input all length measurements here:
1086
+  #define XY_DIAG_AC 282.8427124746
1087
+  #define XY_DIAG_BD 282.8427124746
1088
+  #define XY_SIDE_AD 200
1089
+
1090
+  // Or, set the default skew factors directly here
1091
+  // to override the above measurements:
1092
+  #define XY_SKEW_FACTOR 0.0
1093
+
1094
+  //#define SKEW_CORRECTION_FOR_Z
1095
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1096
+    #define XZ_DIAG_AC 282.8427124746
1097
+    #define XZ_DIAG_BD 282.8427124746
1098
+    #define YZ_DIAG_AC 282.8427124746
1099
+    #define YZ_DIAG_BD 282.8427124746
1100
+    #define YZ_SIDE_AD 200
1101
+    #define XZ_SKEW_FACTOR 0.0
1102
+    #define YZ_SKEW_FACTOR 0.0
1103
+  #endif
1104
+
1105
+  // Enable this option for M852 to set skew at runtime
1106
+  //#define SKEW_CORRECTION_GCODE
1107
+#endif
1108
+
1052 1109
 //=============================================================================
1053 1110
 //============================= Additional Features ===========================
1054 1111
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Felix/Configuration.h Voir le fichier

@@ -814,7 +814,7 @@
814 814
 //===========================================================================
815 815
 //=============================== Bed Leveling ==============================
816 816
 //===========================================================================
817
-// @section bedlevel
817
+// @section calibrate
818 818
 
819 819
 /**
820 820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1021,6 +1021,63 @@
1021 1021
 #define HOMING_FEEDRATE_XY (50*60)
1022 1022
 #define HOMING_FEEDRATE_Z  (4*60)
1023 1023
 
1024
+// @section calibrate
1025
+
1026
+/**
1027
+ * Bed Skew Compensation
1028
+ *
1029
+ * This feature corrects for misalignment in the XYZ axes.
1030
+ *
1031
+ * Take the following steps to get the bed skew in the XY plane:
1032
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1033
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1034
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1035
+ *  4. For XY_SIDE_AD measure the edge A to D
1036
+ *
1037
+ * Marlin automatically computes skew factors from these measurements.
1038
+ * Skew factors may also be computed and set manually:
1039
+ *
1040
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1041
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1042
+ *
1043
+ * If desired, follow the same procedure for XZ and YZ.
1044
+ * Use these diagrams for reference:
1045
+ *
1046
+ *    Y                     Z                     Z
1047
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1048
+ *    |    /       /        |    /       /        |    /       /
1049
+ *    |   /       /         |   /       /         |   /       /
1050
+ *    |  A-------D          |  A-------D          |  A-------D
1051
+ *    +-------------->X     +-------------->X     +-------------->Y
1052
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1053
+ */
1054
+//#define SKEW_CORRECTION
1055
+
1056
+#if ENABLED(SKEW_CORRECTION)
1057
+  // Input all length measurements here:
1058
+  #define XY_DIAG_AC 282.8427124746
1059
+  #define XY_DIAG_BD 282.8427124746
1060
+  #define XY_SIDE_AD 200
1061
+
1062
+  // Or, set the default skew factors directly here
1063
+  // to override the above measurements:
1064
+  #define XY_SKEW_FACTOR 0.0
1065
+
1066
+  //#define SKEW_CORRECTION_FOR_Z
1067
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1068
+    #define XZ_DIAG_AC 282.8427124746
1069
+    #define XZ_DIAG_BD 282.8427124746
1070
+    #define YZ_DIAG_AC 282.8427124746
1071
+    #define YZ_DIAG_BD 282.8427124746
1072
+    #define YZ_SIDE_AD 200
1073
+    #define XZ_SKEW_FACTOR 0.0
1074
+    #define YZ_SKEW_FACTOR 0.0
1075
+  #endif
1076
+
1077
+  // Enable this option for M852 to set skew at runtime
1078
+  //#define SKEW_CORRECTION_GCODE
1079
+#endif
1080
+
1024 1081
 //=============================================================================
1025 1082
 //============================= Additional Features ===========================
1026 1083
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Felix/DUAL/Configuration.h Voir le fichier

@@ -814,7 +814,7 @@
814 814
 //===========================================================================
815 815
 //=============================== Bed Leveling ==============================
816 816
 //===========================================================================
817
-// @section bedlevel
817
+// @section calibrate
818 818
 
819 819
 /**
820 820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1021,6 +1021,63 @@
1021 1021
 #define HOMING_FEEDRATE_XY (50*60)
1022 1022
 #define HOMING_FEEDRATE_Z  (4*60)
1023 1023
 
1024
+// @section calibrate
1025
+
1026
+/**
1027
+ * Bed Skew Compensation
1028
+ *
1029
+ * This feature corrects for misalignment in the XYZ axes.
1030
+ *
1031
+ * Take the following steps to get the bed skew in the XY plane:
1032
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1033
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1034
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1035
+ *  4. For XY_SIDE_AD measure the edge A to D
1036
+ *
1037
+ * Marlin automatically computes skew factors from these measurements.
1038
+ * Skew factors may also be computed and set manually:
1039
+ *
1040
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1041
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1042
+ *
1043
+ * If desired, follow the same procedure for XZ and YZ.
1044
+ * Use these diagrams for reference:
1045
+ *
1046
+ *    Y                     Z                     Z
1047
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1048
+ *    |    /       /        |    /       /        |    /       /
1049
+ *    |   /       /         |   /       /         |   /       /
1050
+ *    |  A-------D          |  A-------D          |  A-------D
1051
+ *    +-------------->X     +-------------->X     +-------------->Y
1052
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1053
+ */
1054
+//#define SKEW_CORRECTION
1055
+
1056
+#if ENABLED(SKEW_CORRECTION)
1057
+  // Input all length measurements here:
1058
+  #define XY_DIAG_AC 282.8427124746
1059
+  #define XY_DIAG_BD 282.8427124746
1060
+  #define XY_SIDE_AD 200
1061
+
1062
+  // Or, set the default skew factors directly here
1063
+  // to override the above measurements:
1064
+  #define XY_SKEW_FACTOR 0.0
1065
+
1066
+  //#define SKEW_CORRECTION_FOR_Z
1067
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1068
+    #define XZ_DIAG_AC 282.8427124746
1069
+    #define XZ_DIAG_BD 282.8427124746
1070
+    #define YZ_DIAG_AC 282.8427124746
1071
+    #define YZ_DIAG_BD 282.8427124746
1072
+    #define YZ_SIDE_AD 200
1073
+    #define XZ_SKEW_FACTOR 0.0
1074
+    #define YZ_SKEW_FACTOR 0.0
1075
+  #endif
1076
+
1077
+  // Enable this option for M852 to set skew at runtime
1078
+  //#define SKEW_CORRECTION_GCODE
1079
+#endif
1080
+
1024 1081
 //=============================================================================
1025 1082
 //============================= Additional Features ===========================
1026 1083
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h Voir le fichier

@@ -829,7 +829,7 @@
829 829
 //===========================================================================
830 830
 //=============================== Bed Leveling ==============================
831 831
 //===========================================================================
832
-// @section bedlevel
832
+// @section calibrate
833 833
 
834 834
 /**
835 835
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1036,6 +1036,63 @@
1036 1036
 #define HOMING_FEEDRATE_XY (40*60)
1037 1037
 #define HOMING_FEEDRATE_Z  (55)
1038 1038
 
1039
+// @section calibrate
1040
+
1041
+/**
1042
+ * Bed Skew Compensation
1043
+ *
1044
+ * This feature corrects for misalignment in the XYZ axes.
1045
+ *
1046
+ * Take the following steps to get the bed skew in the XY plane:
1047
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1048
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1049
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1050
+ *  4. For XY_SIDE_AD measure the edge A to D
1051
+ *
1052
+ * Marlin automatically computes skew factors from these measurements.
1053
+ * Skew factors may also be computed and set manually:
1054
+ *
1055
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1056
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1057
+ *
1058
+ * If desired, follow the same procedure for XZ and YZ.
1059
+ * Use these diagrams for reference:
1060
+ *
1061
+ *    Y                     Z                     Z
1062
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1063
+ *    |    /       /        |    /       /        |    /       /
1064
+ *    |   /       /         |   /       /         |   /       /
1065
+ *    |  A-------D          |  A-------D          |  A-------D
1066
+ *    +-------------->X     +-------------->X     +-------------->Y
1067
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1068
+ */
1069
+//#define SKEW_CORRECTION
1070
+
1071
+#if ENABLED(SKEW_CORRECTION)
1072
+  // Input all length measurements here:
1073
+  #define XY_DIAG_AC 282.8427124746
1074
+  #define XY_DIAG_BD 282.8427124746
1075
+  #define XY_SIDE_AD 200
1076
+
1077
+  // Or, set the default skew factors directly here
1078
+  // to override the above measurements:
1079
+  #define XY_SKEW_FACTOR 0.0
1080
+
1081
+  //#define SKEW_CORRECTION_FOR_Z
1082
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1083
+    #define XZ_DIAG_AC 282.8427124746
1084
+    #define XZ_DIAG_BD 282.8427124746
1085
+    #define YZ_DIAG_AC 282.8427124746
1086
+    #define YZ_DIAG_BD 282.8427124746
1087
+    #define YZ_SIDE_AD 200
1088
+    #define XZ_SKEW_FACTOR 0.0
1089
+    #define YZ_SKEW_FACTOR 0.0
1090
+  #endif
1091
+
1092
+  // Enable this option for M852 to set skew at runtime
1093
+  //#define SKEW_CORRECTION_GCODE
1094
+#endif
1095
+
1039 1096
 //=============================================================================
1040 1097
 //============================= Additional Features ===========================
1041 1098
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h Voir le fichier

@@ -847,7 +847,7 @@
847 847
 //===========================================================================
848 848
 //=============================== Bed Leveling ==============================
849 849
 //===========================================================================
850
-// @section bedlevel
850
+// @section calibrate
851 851
 
852 852
 /**
853 853
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1054,6 +1054,63 @@
1054 1054
 #define HOMING_FEEDRATE_XY (50*60)
1055 1055
 #define HOMING_FEEDRATE_Z  (4*60)
1056 1056
 
1057
+// @section calibrate
1058
+
1059
+/**
1060
+ * Bed Skew Compensation
1061
+ *
1062
+ * This feature corrects for misalignment in the XYZ axes.
1063
+ *
1064
+ * Take the following steps to get the bed skew in the XY plane:
1065
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1066
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1067
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1068
+ *  4. For XY_SIDE_AD measure the edge A to D
1069
+ *
1070
+ * Marlin automatically computes skew factors from these measurements.
1071
+ * Skew factors may also be computed and set manually:
1072
+ *
1073
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1074
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1075
+ *
1076
+ * If desired, follow the same procedure for XZ and YZ.
1077
+ * Use these diagrams for reference:
1078
+ *
1079
+ *    Y                     Z                     Z
1080
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1081
+ *    |    /       /        |    /       /        |    /       /
1082
+ *    |   /       /         |   /       /         |   /       /
1083
+ *    |  A-------D          |  A-------D          |  A-------D
1084
+ *    +-------------->X     +-------------->X     +-------------->Y
1085
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1086
+ */
1087
+//#define SKEW_CORRECTION
1088
+
1089
+#if ENABLED(SKEW_CORRECTION)
1090
+  // Input all length measurements here:
1091
+  #define XY_DIAG_AC 282.8427124746
1092
+  #define XY_DIAG_BD 282.8427124746
1093
+  #define XY_SIDE_AD 200
1094
+
1095
+  // Or, set the default skew factors directly here
1096
+  // to override the above measurements:
1097
+  #define XY_SKEW_FACTOR 0.0
1098
+
1099
+  //#define SKEW_CORRECTION_FOR_Z
1100
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1101
+    #define XZ_DIAG_AC 282.8427124746
1102
+    #define XZ_DIAG_BD 282.8427124746
1103
+    #define YZ_DIAG_AC 282.8427124746
1104
+    #define YZ_DIAG_BD 282.8427124746
1105
+    #define YZ_SIDE_AD 200
1106
+    #define XZ_SKEW_FACTOR 0.0
1107
+    #define YZ_SKEW_FACTOR 0.0
1108
+  #endif
1109
+
1110
+  // Enable this option for M852 to set skew at runtime
1111
+  //#define SKEW_CORRECTION_GCODE
1112
+#endif
1113
+
1057 1114
 //=============================================================================
1058 1115
 //============================= Additional Features ===========================
1059 1116
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h Voir le fichier

@@ -836,7 +836,7 @@
836 836
 //===========================================================================
837 837
 //=============================== Bed Leveling ==============================
838 838
 //===========================================================================
839
-// @section bedlevel
839
+// @section calibrate
840 840
 
841 841
 /**
842 842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1043,6 +1043,63 @@
1043 1043
 #define HOMING_FEEDRATE_XY (50*60)
1044 1044
 #define HOMING_FEEDRATE_Z  (4*60)
1045 1045
 
1046
+// @section calibrate
1047
+
1048
+/**
1049
+ * Bed Skew Compensation
1050
+ *
1051
+ * This feature corrects for misalignment in the XYZ axes.
1052
+ *
1053
+ * Take the following steps to get the bed skew in the XY plane:
1054
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1055
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1056
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1057
+ *  4. For XY_SIDE_AD measure the edge A to D
1058
+ *
1059
+ * Marlin automatically computes skew factors from these measurements.
1060
+ * Skew factors may also be computed and set manually:
1061
+ *
1062
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1063
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1064
+ *
1065
+ * If desired, follow the same procedure for XZ and YZ.
1066
+ * Use these diagrams for reference:
1067
+ *
1068
+ *    Y                     Z                     Z
1069
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1070
+ *    |    /       /        |    /       /        |    /       /
1071
+ *    |   /       /         |   /       /         |   /       /
1072
+ *    |  A-------D          |  A-------D          |  A-------D
1073
+ *    +-------------->X     +-------------->X     +-------------->Y
1074
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1075
+ */
1076
+//#define SKEW_CORRECTION
1077
+
1078
+#if ENABLED(SKEW_CORRECTION)
1079
+  // Input all length measurements here:
1080
+  #define XY_DIAG_AC 282.8427124746
1081
+  #define XY_DIAG_BD 282.8427124746
1082
+  #define XY_SIDE_AD 200
1083
+
1084
+  // Or, set the default skew factors directly here
1085
+  // to override the above measurements:
1086
+  #define XY_SKEW_FACTOR 0.0
1087
+
1088
+  //#define SKEW_CORRECTION_FOR_Z
1089
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1090
+    #define XZ_DIAG_AC 282.8427124746
1091
+    #define XZ_DIAG_BD 282.8427124746
1092
+    #define YZ_DIAG_AC 282.8427124746
1093
+    #define YZ_DIAG_BD 282.8427124746
1094
+    #define YZ_SIDE_AD 200
1095
+    #define XZ_SKEW_FACTOR 0.0
1096
+    #define YZ_SKEW_FACTOR 0.0
1097
+  #endif
1098
+
1099
+  // Enable this option for M852 to set skew at runtime
1100
+  //#define SKEW_CORRECTION_GCODE
1101
+#endif
1102
+
1046 1103
 //=============================================================================
1047 1104
 //============================= Additional Features ===========================
1048 1105
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Malyan/M150/Configuration.h Voir le fichier

@@ -856,7 +856,7 @@
856 856
 //===========================================================================
857 857
 //=============================== Bed Leveling ==============================
858 858
 //===========================================================================
859
-// @section bedlevel
859
+// @section calibrate
860 860
 
861 861
 /**
862 862
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1067,6 +1067,63 @@
1067 1067
 #define HOMING_FEEDRATE_XY (50*60)
1068 1068
 #define HOMING_FEEDRATE_Z  (4*60)
1069 1069
 
1070
+// @section calibrate
1071
+
1072
+/**
1073
+ * Bed Skew Compensation
1074
+ *
1075
+ * This feature corrects for misalignment in the XYZ axes.
1076
+ *
1077
+ * Take the following steps to get the bed skew in the XY plane:
1078
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1079
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1080
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1081
+ *  4. For XY_SIDE_AD measure the edge A to D
1082
+ *
1083
+ * Marlin automatically computes skew factors from these measurements.
1084
+ * Skew factors may also be computed and set manually:
1085
+ *
1086
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1087
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1088
+ *
1089
+ * If desired, follow the same procedure for XZ and YZ.
1090
+ * Use these diagrams for reference:
1091
+ *
1092
+ *    Y                     Z                     Z
1093
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1094
+ *    |    /       /        |    /       /        |    /       /
1095
+ *    |   /       /         |   /       /         |   /       /
1096
+ *    |  A-------D          |  A-------D          |  A-------D
1097
+ *    +-------------->X     +-------------->X     +-------------->Y
1098
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1099
+ */
1100
+//#define SKEW_CORRECTION
1101
+
1102
+#if ENABLED(SKEW_CORRECTION)
1103
+  // Input all length measurements here:
1104
+  #define XY_DIAG_AC 282.8427124746
1105
+  #define XY_DIAG_BD 282.8427124746
1106
+  #define XY_SIDE_AD 200
1107
+
1108
+  // Or, set the default skew factors directly here
1109
+  // to override the above measurements:
1110
+  #define XY_SKEW_FACTOR 0.0
1111
+
1112
+  //#define SKEW_CORRECTION_FOR_Z
1113
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1114
+    #define XZ_DIAG_AC 282.8427124746
1115
+    #define XZ_DIAG_BD 282.8427124746
1116
+    #define YZ_DIAG_AC 282.8427124746
1117
+    #define YZ_DIAG_BD 282.8427124746
1118
+    #define YZ_SIDE_AD 200
1119
+    #define XZ_SKEW_FACTOR 0.0
1120
+    #define YZ_SKEW_FACTOR 0.0
1121
+  #endif
1122
+
1123
+  // Enable this option for M852 to set skew at runtime
1124
+  //#define SKEW_CORRECTION_GCODE
1125
+#endif
1126
+
1070 1127
 //=============================================================================
1071 1128
 //============================= Additional Features ===========================
1072 1129
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h Voir le fichier

@@ -836,7 +836,7 @@
836 836
 //===========================================================================
837 837
 //=============================== Bed Leveling ==============================
838 838
 //===========================================================================
839
-// @section bedlevel
839
+// @section calibrate
840 840
 
841 841
 /**
842 842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1043,6 +1043,63 @@
1043 1043
 #define HOMING_FEEDRATE_XY (50*60)
1044 1044
 #define HOMING_FEEDRATE_Z  (4*60)
1045 1045
 
1046
+// @section calibrate
1047
+
1048
+/**
1049
+ * Bed Skew Compensation
1050
+ *
1051
+ * This feature corrects for misalignment in the XYZ axes.
1052
+ *
1053
+ * Take the following steps to get the bed skew in the XY plane:
1054
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1055
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1056
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1057
+ *  4. For XY_SIDE_AD measure the edge A to D
1058
+ *
1059
+ * Marlin automatically computes skew factors from these measurements.
1060
+ * Skew factors may also be computed and set manually:
1061
+ *
1062
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1063
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1064
+ *
1065
+ * If desired, follow the same procedure for XZ and YZ.
1066
+ * Use these diagrams for reference:
1067
+ *
1068
+ *    Y                     Z                     Z
1069
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1070
+ *    |    /       /        |    /       /        |    /       /
1071
+ *    |   /       /         |   /       /         |   /       /
1072
+ *    |  A-------D          |  A-------D          |  A-------D
1073
+ *    +-------------->X     +-------------->X     +-------------->Y
1074
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1075
+ */
1076
+//#define SKEW_CORRECTION
1077
+
1078
+#if ENABLED(SKEW_CORRECTION)
1079
+  // Input all length measurements here:
1080
+  #define XY_DIAG_AC 282.8427124746
1081
+  #define XY_DIAG_BD 282.8427124746
1082
+  #define XY_SIDE_AD 200
1083
+
1084
+  // Or, set the default skew factors directly here
1085
+  // to override the above measurements:
1086
+  #define XY_SKEW_FACTOR 0.0
1087
+
1088
+  //#define SKEW_CORRECTION_FOR_Z
1089
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1090
+    #define XZ_DIAG_AC 282.8427124746
1091
+    #define XZ_DIAG_BD 282.8427124746
1092
+    #define YZ_DIAG_AC 282.8427124746
1093
+    #define YZ_DIAG_BD 282.8427124746
1094
+    #define YZ_SIDE_AD 200
1095
+    #define XZ_SKEW_FACTOR 0.0
1096
+    #define YZ_SKEW_FACTOR 0.0
1097
+  #endif
1098
+
1099
+  // Enable this option for M852 to set skew at runtime
1100
+  //#define SKEW_CORRECTION_GCODE
1101
+#endif
1102
+
1046 1103
 //=============================================================================
1047 1104
 //============================= Additional Features ===========================
1048 1105
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h Voir le fichier

@@ -836,7 +836,7 @@
836 836
 //===========================================================================
837 837
 //=============================== Bed Leveling ==============================
838 838
 //===========================================================================
839
-// @section bedlevel
839
+// @section calibrate
840 840
 
841 841
 /**
842 842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1043,6 +1043,63 @@
1043 1043
 #define HOMING_FEEDRATE_XY (50*60)
1044 1044
 #define HOMING_FEEDRATE_Z  (4*60)
1045 1045
 
1046
+// @section calibrate
1047
+
1048
+/**
1049
+ * Bed Skew Compensation
1050
+ *
1051
+ * This feature corrects for misalignment in the XYZ axes.
1052
+ *
1053
+ * Take the following steps to get the bed skew in the XY plane:
1054
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1055
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1056
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1057
+ *  4. For XY_SIDE_AD measure the edge A to D
1058
+ *
1059
+ * Marlin automatically computes skew factors from these measurements.
1060
+ * Skew factors may also be computed and set manually:
1061
+ *
1062
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1063
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1064
+ *
1065
+ * If desired, follow the same procedure for XZ and YZ.
1066
+ * Use these diagrams for reference:
1067
+ *
1068
+ *    Y                     Z                     Z
1069
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1070
+ *    |    /       /        |    /       /        |    /       /
1071
+ *    |   /       /         |   /       /         |   /       /
1072
+ *    |  A-------D          |  A-------D          |  A-------D
1073
+ *    +-------------->X     +-------------->X     +-------------->Y
1074
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1075
+ */
1076
+//#define SKEW_CORRECTION
1077
+
1078
+#if ENABLED(SKEW_CORRECTION)
1079
+  // Input all length measurements here:
1080
+  #define XY_DIAG_AC 282.8427124746
1081
+  #define XY_DIAG_BD 282.8427124746
1082
+  #define XY_SIDE_AD 200
1083
+
1084
+  // Or, set the default skew factors directly here
1085
+  // to override the above measurements:
1086
+  #define XY_SKEW_FACTOR 0.0
1087
+
1088
+  //#define SKEW_CORRECTION_FOR_Z
1089
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1090
+    #define XZ_DIAG_AC 282.8427124746
1091
+    #define XZ_DIAG_BD 282.8427124746
1092
+    #define YZ_DIAG_AC 282.8427124746
1093
+    #define YZ_DIAG_BD 282.8427124746
1094
+    #define YZ_SIDE_AD 200
1095
+    #define XZ_SKEW_FACTOR 0.0
1096
+    #define YZ_SKEW_FACTOR 0.0
1097
+  #endif
1098
+
1099
+  // Enable this option for M852 to set skew at runtime
1100
+  //#define SKEW_CORRECTION_GCODE
1101
+#endif
1102
+
1046 1103
 //=============================================================================
1047 1104
 //============================= Additional Features ===========================
1048 1105
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Mks/Sbase/Configuration.h Voir le fichier

@@ -833,7 +833,7 @@
833 833
 //===========================================================================
834 834
 //=============================== Bed Leveling ==============================
835 835
 //===========================================================================
836
-// @section bedlevel
836
+// @section calibrate
837 837
 
838 838
 /**
839 839
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1040,6 +1040,63 @@
1040 1040
 #define HOMING_FEEDRATE_XY (50*60)
1041 1041
 #define HOMING_FEEDRATE_Z  (4*60)
1042 1042
 
1043
+// @section calibrate
1044
+
1045
+/**
1046
+ * Bed Skew Compensation
1047
+ *
1048
+ * This feature corrects for misalignment in the XYZ axes.
1049
+ *
1050
+ * Take the following steps to get the bed skew in the XY plane:
1051
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1052
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1053
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1054
+ *  4. For XY_SIDE_AD measure the edge A to D
1055
+ *
1056
+ * Marlin automatically computes skew factors from these measurements.
1057
+ * Skew factors may also be computed and set manually:
1058
+ *
1059
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1060
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1061
+ *
1062
+ * If desired, follow the same procedure for XZ and YZ.
1063
+ * Use these diagrams for reference:
1064
+ *
1065
+ *    Y                     Z                     Z
1066
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1067
+ *    |    /       /        |    /       /        |    /       /
1068
+ *    |   /       /         |   /       /         |   /       /
1069
+ *    |  A-------D          |  A-------D          |  A-------D
1070
+ *    +-------------->X     +-------------->X     +-------------->Y
1071
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1072
+ */
1073
+//#define SKEW_CORRECTION
1074
+
1075
+#if ENABLED(SKEW_CORRECTION)
1076
+  // Input all length measurements here:
1077
+  #define XY_DIAG_AC 282.8427124746
1078
+  #define XY_DIAG_BD 282.8427124746
1079
+  #define XY_SIDE_AD 200
1080
+
1081
+  // Or, set the default skew factors directly here
1082
+  // to override the above measurements:
1083
+  #define XY_SKEW_FACTOR 0.0
1084
+
1085
+  //#define SKEW_CORRECTION_FOR_Z
1086
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1087
+    #define XZ_DIAG_AC 282.8427124746
1088
+    #define XZ_DIAG_BD 282.8427124746
1089
+    #define YZ_DIAG_AC 282.8427124746
1090
+    #define YZ_DIAG_BD 282.8427124746
1091
+    #define YZ_SIDE_AD 200
1092
+    #define XZ_SKEW_FACTOR 0.0
1093
+    #define YZ_SKEW_FACTOR 0.0
1094
+  #endif
1095
+
1096
+  // Enable this option for M852 to set skew at runtime
1097
+  //#define SKEW_CORRECTION_GCODE
1098
+#endif
1099
+
1043 1100
 //=============================================================================
1044 1101
 //============================= Additional Features ===========================
1045 1102
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/RigidBot/Configuration.h Voir le fichier

@@ -830,7 +830,7 @@
830 830
 //===========================================================================
831 831
 //=============================== Bed Leveling ==============================
832 832
 //===========================================================================
833
-// @section bedlevel
833
+// @section calibrate
834 834
 
835 835
 /**
836 836
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1037,6 +1037,63 @@
1037 1037
 #define HOMING_FEEDRATE_XY (50*60)
1038 1038
 #define HOMING_FEEDRATE_Z  (15*60)
1039 1039
 
1040
+// @section calibrate
1041
+
1042
+/**
1043
+ * Bed Skew Compensation
1044
+ *
1045
+ * This feature corrects for misalignment in the XYZ axes.
1046
+ *
1047
+ * Take the following steps to get the bed skew in the XY plane:
1048
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1049
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1050
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1051
+ *  4. For XY_SIDE_AD measure the edge A to D
1052
+ *
1053
+ * Marlin automatically computes skew factors from these measurements.
1054
+ * Skew factors may also be computed and set manually:
1055
+ *
1056
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1057
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1058
+ *
1059
+ * If desired, follow the same procedure for XZ and YZ.
1060
+ * Use these diagrams for reference:
1061
+ *
1062
+ *    Y                     Z                     Z
1063
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1064
+ *    |    /       /        |    /       /        |    /       /
1065
+ *    |   /       /         |   /       /         |   /       /
1066
+ *    |  A-------D          |  A-------D          |  A-------D
1067
+ *    +-------------->X     +-------------->X     +-------------->Y
1068
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1069
+ */
1070
+//#define SKEW_CORRECTION
1071
+
1072
+#if ENABLED(SKEW_CORRECTION)
1073
+  // Input all length measurements here:
1074
+  #define XY_DIAG_AC 282.8427124746
1075
+  #define XY_DIAG_BD 282.8427124746
1076
+  #define XY_SIDE_AD 200
1077
+
1078
+  // Or, set the default skew factors directly here
1079
+  // to override the above measurements:
1080
+  #define XY_SKEW_FACTOR 0.0
1081
+
1082
+  //#define SKEW_CORRECTION_FOR_Z
1083
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1084
+    #define XZ_DIAG_AC 282.8427124746
1085
+    #define XZ_DIAG_BD 282.8427124746
1086
+    #define YZ_DIAG_AC 282.8427124746
1087
+    #define YZ_DIAG_BD 282.8427124746
1088
+    #define YZ_SIDE_AD 200
1089
+    #define XZ_SKEW_FACTOR 0.0
1090
+    #define YZ_SKEW_FACTOR 0.0
1091
+  #endif
1092
+
1093
+  // Enable this option for M852 to set skew at runtime
1094
+  //#define SKEW_CORRECTION_GCODE
1095
+#endif
1096
+
1040 1097
 //=============================================================================
1041 1098
 //============================= Additional Features ===========================
1042 1099
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/SCARA/Configuration.h Voir le fichier

@@ -844,7 +844,7 @@
844 844
 //===========================================================================
845 845
 //=============================== Bed Leveling ==============================
846 846
 //===========================================================================
847
-// @section bedlevel
847
+// @section calibrate
848 848
 
849 849
 /**
850 850
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1051,6 +1051,63 @@
1051 1051
 #define HOMING_FEEDRATE_XY (40*60)
1052 1052
 #define HOMING_FEEDRATE_Z  (10*60)
1053 1053
 
1054
+// @section calibrate
1055
+
1056
+/**
1057
+ * Bed Skew Compensation
1058
+ *
1059
+ * This feature corrects for misalignment in the XYZ axes.
1060
+ *
1061
+ * Take the following steps to get the bed skew in the XY plane:
1062
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1063
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1064
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1065
+ *  4. For XY_SIDE_AD measure the edge A to D
1066
+ *
1067
+ * Marlin automatically computes skew factors from these measurements.
1068
+ * Skew factors may also be computed and set manually:
1069
+ *
1070
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1071
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1072
+ *
1073
+ * If desired, follow the same procedure for XZ and YZ.
1074
+ * Use these diagrams for reference:
1075
+ *
1076
+ *    Y                     Z                     Z
1077
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1078
+ *    |    /       /        |    /       /        |    /       /
1079
+ *    |   /       /         |   /       /         |   /       /
1080
+ *    |  A-------D          |  A-------D          |  A-------D
1081
+ *    +-------------->X     +-------------->X     +-------------->Y
1082
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1083
+ */
1084
+//#define SKEW_CORRECTION
1085
+
1086
+#if ENABLED(SKEW_CORRECTION)
1087
+  // Input all length measurements here:
1088
+  #define XY_DIAG_AC 282.8427124746
1089
+  #define XY_DIAG_BD 282.8427124746
1090
+  #define XY_SIDE_AD 200
1091
+
1092
+  // Or, set the default skew factors directly here
1093
+  // to override the above measurements:
1094
+  #define XY_SKEW_FACTOR 0.0
1095
+
1096
+  //#define SKEW_CORRECTION_FOR_Z
1097
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1098
+    #define XZ_DIAG_AC 282.8427124746
1099
+    #define XZ_DIAG_BD 282.8427124746
1100
+    #define YZ_DIAG_AC 282.8427124746
1101
+    #define YZ_DIAG_BD 282.8427124746
1102
+    #define YZ_SIDE_AD 200
1103
+    #define XZ_SKEW_FACTOR 0.0
1104
+    #define YZ_SKEW_FACTOR 0.0
1105
+  #endif
1106
+
1107
+  // Enable this option for M852 to set skew at runtime
1108
+  //#define SKEW_CORRECTION_GCODE
1109
+#endif
1110
+
1054 1111
 //=============================================================================
1055 1112
 //============================= Additional Features ===========================
1056 1113
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/STM32F10/Configuration.h Voir le fichier

@@ -835,7 +835,7 @@
835 835
 //===========================================================================
836 836
 //=============================== Bed Leveling ==============================
837 837
 //===========================================================================
838
-// @section bedlevel
838
+// @section calibrate
839 839
 
840 840
 /**
841 841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1042,6 +1042,63 @@
1042 1042
 #define HOMING_FEEDRATE_XY (50*60)
1043 1043
 #define HOMING_FEEDRATE_Z  (4*60)
1044 1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1045 1102
 //=============================================================================
1046 1103
 //============================= Additional Features ===========================
1047 1104
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Sanguinololu/Configuration.h Voir le fichier

@@ -863,7 +863,7 @@
863 863
 //===========================================================================
864 864
 //=============================== Bed Leveling ==============================
865 865
 //===========================================================================
866
-// @section bedlevel
866
+// @section calibrate
867 867
 
868 868
 /**
869 869
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1070,6 +1070,63 @@
1070 1070
 #define HOMING_FEEDRATE_XY (50*60)
1071 1071
 #define HOMING_FEEDRATE_Z  (6*60)
1072 1072
 
1073
+// @section calibrate
1074
+
1075
+/**
1076
+ * Bed Skew Compensation
1077
+ *
1078
+ * This feature corrects for misalignment in the XYZ axes.
1079
+ *
1080
+ * Take the following steps to get the bed skew in the XY plane:
1081
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1082
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1083
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1084
+ *  4. For XY_SIDE_AD measure the edge A to D
1085
+ *
1086
+ * Marlin automatically computes skew factors from these measurements.
1087
+ * Skew factors may also be computed and set manually:
1088
+ *
1089
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1090
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1091
+ *
1092
+ * If desired, follow the same procedure for XZ and YZ.
1093
+ * Use these diagrams for reference:
1094
+ *
1095
+ *    Y                     Z                     Z
1096
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1097
+ *    |    /       /        |    /       /        |    /       /
1098
+ *    |   /       /         |   /       /         |   /       /
1099
+ *    |  A-------D          |  A-------D          |  A-------D
1100
+ *    +-------------->X     +-------------->X     +-------------->Y
1101
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1102
+ */
1103
+//#define SKEW_CORRECTION
1104
+
1105
+#if ENABLED(SKEW_CORRECTION)
1106
+  // Input all length measurements here:
1107
+  #define XY_DIAG_AC 282.8427124746
1108
+  #define XY_DIAG_BD 282.8427124746
1109
+  #define XY_SIDE_AD 200
1110
+
1111
+  // Or, set the default skew factors directly here
1112
+  // to override the above measurements:
1113
+  #define XY_SKEW_FACTOR 0.0
1114
+
1115
+  //#define SKEW_CORRECTION_FOR_Z
1116
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1117
+    #define XZ_DIAG_AC 282.8427124746
1118
+    #define XZ_DIAG_BD 282.8427124746
1119
+    #define YZ_DIAG_AC 282.8427124746
1120
+    #define YZ_DIAG_BD 282.8427124746
1121
+    #define YZ_SIDE_AD 200
1122
+    #define XZ_SKEW_FACTOR 0.0
1123
+    #define YZ_SKEW_FACTOR 0.0
1124
+  #endif
1125
+
1126
+  // Enable this option for M852 to set skew at runtime
1127
+  //#define SKEW_CORRECTION_GCODE
1128
+#endif
1129
+
1073 1130
 //=============================================================================
1074 1131
 //============================= Additional Features ===========================
1075 1132
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/TinyBoy2/Configuration.h Voir le fichier

@@ -888,7 +888,7 @@
888 888
 //===========================================================================
889 889
 //=============================== Bed Leveling ==============================
890 890
 //===========================================================================
891
-// @section bedlevel
891
+// @section calibrate
892 892
 
893 893
 /**
894 894
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1095,6 +1095,63 @@
1095 1095
 #define HOMING_FEEDRATE_XY (40*60)
1096 1096
 #define HOMING_FEEDRATE_Z  (3*60)
1097 1097
 
1098
+// @section calibrate
1099
+
1100
+/**
1101
+ * Bed Skew Compensation
1102
+ *
1103
+ * This feature corrects for misalignment in the XYZ axes.
1104
+ *
1105
+ * Take the following steps to get the bed skew in the XY plane:
1106
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1107
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1108
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1109
+ *  4. For XY_SIDE_AD measure the edge A to D
1110
+ *
1111
+ * Marlin automatically computes skew factors from these measurements.
1112
+ * Skew factors may also be computed and set manually:
1113
+ *
1114
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1115
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1116
+ *
1117
+ * If desired, follow the same procedure for XZ and YZ.
1118
+ * Use these diagrams for reference:
1119
+ *
1120
+ *    Y                     Z                     Z
1121
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1122
+ *    |    /       /        |    /       /        |    /       /
1123
+ *    |   /       /         |   /       /         |   /       /
1124
+ *    |  A-------D          |  A-------D          |  A-------D
1125
+ *    +-------------->X     +-------------->X     +-------------->Y
1126
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1127
+ */
1128
+//#define SKEW_CORRECTION
1129
+
1130
+#if ENABLED(SKEW_CORRECTION)
1131
+  // Input all length measurements here:
1132
+  #define XY_DIAG_AC 282.8427124746
1133
+  #define XY_DIAG_BD 282.8427124746
1134
+  #define XY_SIDE_AD 200
1135
+
1136
+  // Or, set the default skew factors directly here
1137
+  // to override the above measurements:
1138
+  #define XY_SKEW_FACTOR 0.0
1139
+
1140
+  //#define SKEW_CORRECTION_FOR_Z
1141
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1142
+    #define XZ_DIAG_AC 282.8427124746
1143
+    #define XZ_DIAG_BD 282.8427124746
1144
+    #define YZ_DIAG_AC 282.8427124746
1145
+    #define YZ_DIAG_BD 282.8427124746
1146
+    #define YZ_SIDE_AD 200
1147
+    #define XZ_SKEW_FACTOR 0.0
1148
+    #define YZ_SKEW_FACTOR 0.0
1149
+  #endif
1150
+
1151
+  // Enable this option for M852 to set skew at runtime
1152
+  //#define SKEW_CORRECTION_GCODE
1153
+#endif
1154
+
1098 1155
 //=============================================================================
1099 1156
 //============================= Additional Features ===========================
1100 1157
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Velleman/K8200/Configuration.h Voir le fichier

@@ -862,7 +862,7 @@
862 862
 //===========================================================================
863 863
 //=============================== Bed Leveling ==============================
864 864
 //===========================================================================
865
-// @section bedlevel
865
+// @section calibrate
866 866
 
867 867
 /**
868 868
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1069,6 +1069,63 @@
1069 1069
 #define HOMING_FEEDRATE_XY (50*60)
1070 1070
 #define HOMING_FEEDRATE_Z  (4*60)
1071 1071
 
1072
+// @section calibrate
1073
+
1074
+/**
1075
+ * Bed Skew Compensation
1076
+ *
1077
+ * This feature corrects for misalignment in the XYZ axes.
1078
+ *
1079
+ * Take the following steps to get the bed skew in the XY plane:
1080
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1081
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1082
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1083
+ *  4. For XY_SIDE_AD measure the edge A to D
1084
+ *
1085
+ * Marlin automatically computes skew factors from these measurements.
1086
+ * Skew factors may also be computed and set manually:
1087
+ *
1088
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1089
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1090
+ *
1091
+ * If desired, follow the same procedure for XZ and YZ.
1092
+ * Use these diagrams for reference:
1093
+ *
1094
+ *    Y                     Z                     Z
1095
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1096
+ *    |    /       /        |    /       /        |    /       /
1097
+ *    |   /       /         |   /       /         |   /       /
1098
+ *    |  A-------D          |  A-------D          |  A-------D
1099
+ *    +-------------->X     +-------------->X     +-------------->Y
1100
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1101
+ */
1102
+//#define SKEW_CORRECTION
1103
+
1104
+#if ENABLED(SKEW_CORRECTION)
1105
+  // Input all length measurements here:
1106
+  #define XY_DIAG_AC 282.8427124746
1107
+  #define XY_DIAG_BD 282.8427124746
1108
+  #define XY_SIDE_AD 200
1109
+
1110
+  // Or, set the default skew factors directly here
1111
+  // to override the above measurements:
1112
+  #define XY_SKEW_FACTOR 0.0
1113
+
1114
+  //#define SKEW_CORRECTION_FOR_Z
1115
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1116
+    #define XZ_DIAG_AC 282.8427124746
1117
+    #define XZ_DIAG_BD 282.8427124746
1118
+    #define YZ_DIAG_AC 282.8427124746
1119
+    #define YZ_DIAG_BD 282.8427124746
1120
+    #define YZ_SIDE_AD 200
1121
+    #define XZ_SKEW_FACTOR 0.0
1122
+    #define YZ_SKEW_FACTOR 0.0
1123
+  #endif
1124
+
1125
+  // Enable this option for M852 to set skew at runtime
1126
+  //#define SKEW_CORRECTION_GCODE
1127
+#endif
1128
+
1072 1129
 //=============================================================================
1073 1130
 //============================= Additional Features ===========================
1074 1131
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Velleman/K8400/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (8*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (8*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/adafruit/ST7565/Configuration.h Voir le fichier

@@ -832,7 +832,7 @@
832 832
 //===========================================================================
833 833
 //=============================== Bed Leveling ==============================
834 834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836 836
 
837 837
 /**
838 838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1039,6 +1039,63 @@
1039 1039
 #define HOMING_FEEDRATE_XY (50*60)
1040 1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041 1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042 1099
 //=============================================================================
1043 1100
 //============================= Additional Features ===========================
1044 1101
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h Voir le fichier

@@ -962,7 +962,7 @@
962 962
 //===========================================================================
963 963
 //=============================== Bed Leveling ==============================
964 964
 //===========================================================================
965
-// @section bedlevel
965
+// @section calibrate
966 966
 
967 967
 /**
968 968
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1172,6 +1172,63 @@
1172 1172
 // Delta only homes to Z
1173 1173
 #define HOMING_FEEDRATE_Z  (100*60)
1174 1174
 
1175
+// @section calibrate
1176
+
1177
+/**
1178
+ * Bed Skew Compensation
1179
+ *
1180
+ * This feature corrects for misalignment in the XYZ axes.
1181
+ *
1182
+ * Take the following steps to get the bed skew in the XY plane:
1183
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1184
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1185
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1186
+ *  4. For XY_SIDE_AD measure the edge A to D
1187
+ *
1188
+ * Marlin automatically computes skew factors from these measurements.
1189
+ * Skew factors may also be computed and set manually:
1190
+ *
1191
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1192
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1193
+ *
1194
+ * If desired, follow the same procedure for XZ and YZ.
1195
+ * Use these diagrams for reference:
1196
+ *
1197
+ *    Y                     Z                     Z
1198
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1199
+ *    |    /       /        |    /       /        |    /       /
1200
+ *    |   /       /         |   /       /         |   /       /
1201
+ *    |  A-------D          |  A-------D          |  A-------D
1202
+ *    +-------------->X     +-------------->X     +-------------->Y
1203
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1204
+ */
1205
+//#define SKEW_CORRECTION
1206
+
1207
+#if ENABLED(SKEW_CORRECTION)
1208
+  // Input all length measurements here:
1209
+  #define XY_DIAG_AC 282.8427124746
1210
+  #define XY_DIAG_BD 282.8427124746
1211
+  #define XY_SIDE_AD 200
1212
+
1213
+  // Or, set the default skew factors directly here
1214
+  // to override the above measurements:
1215
+  #define XY_SKEW_FACTOR 0.0
1216
+
1217
+  //#define SKEW_CORRECTION_FOR_Z
1218
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1219
+    #define XZ_DIAG_AC 282.8427124746
1220
+    #define XZ_DIAG_BD 282.8427124746
1221
+    #define YZ_DIAG_AC 282.8427124746
1222
+    #define YZ_DIAG_BD 282.8427124746
1223
+    #define YZ_SIDE_AD 200
1224
+    #define XZ_SKEW_FACTOR 0.0
1225
+    #define YZ_SKEW_FACTOR 0.0
1226
+  #endif
1227
+
1228
+  // Enable this option for M852 to set skew at runtime
1229
+  //#define SKEW_CORRECTION_GCODE
1230
+#endif
1231
+
1175 1232
 //=============================================================================
1176 1233
 //============================= Additional Features ===========================
1177 1234
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h Voir le fichier

@@ -962,7 +962,7 @@
962 962
 //===========================================================================
963 963
 //=============================== Bed Leveling ==============================
964 964
 //===========================================================================
965
-// @section bedlevel
965
+// @section calibrate
966 966
 
967 967
 /**
968 968
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1166,6 +1166,63 @@
1166 1166
 // Delta only homes to Z
1167 1167
 #define HOMING_FEEDRATE_Z  (45*60)
1168 1168
 
1169
+// @section calibrate
1170
+
1171
+/**
1172
+ * Bed Skew Compensation
1173
+ *
1174
+ * This feature corrects for misalignment in the XYZ axes.
1175
+ *
1176
+ * Take the following steps to get the bed skew in the XY plane:
1177
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1178
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1179
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1180
+ *  4. For XY_SIDE_AD measure the edge A to D
1181
+ *
1182
+ * Marlin automatically computes skew factors from these measurements.
1183
+ * Skew factors may also be computed and set manually:
1184
+ *
1185
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1186
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1187
+ *
1188
+ * If desired, follow the same procedure for XZ and YZ.
1189
+ * Use these diagrams for reference:
1190
+ *
1191
+ *    Y                     Z                     Z
1192
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1193
+ *    |    /       /        |    /       /        |    /       /
1194
+ *    |   /       /         |   /       /         |   /       /
1195
+ *    |  A-------D          |  A-------D          |  A-------D
1196
+ *    +-------------->X     +-------------->X     +-------------->Y
1197
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1198
+ */
1199
+//#define SKEW_CORRECTION
1200
+
1201
+#if ENABLED(SKEW_CORRECTION)
1202
+  // Input all length measurements here:
1203
+  #define XY_DIAG_AC 282.8427124746
1204
+  #define XY_DIAG_BD 282.8427124746
1205
+  #define XY_SIDE_AD 200
1206
+
1207
+  // Or, set the default skew factors directly here
1208
+  // to override the above measurements:
1209
+  #define XY_SKEW_FACTOR 0.0
1210
+
1211
+  //#define SKEW_CORRECTION_FOR_Z
1212
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1213
+    #define XZ_DIAG_AC 282.8427124746
1214
+    #define XZ_DIAG_BD 282.8427124746
1215
+    #define YZ_DIAG_AC 282.8427124746
1216
+    #define YZ_DIAG_BD 282.8427124746
1217
+    #define YZ_SIDE_AD 200
1218
+    #define XZ_SKEW_FACTOR 0.0
1219
+    #define YZ_SKEW_FACTOR 0.0
1220
+  #endif
1221
+
1222
+  // Enable this option for M852 to set skew at runtime
1223
+  //#define SKEW_CORRECTION_GCODE
1224
+#endif
1225
+
1169 1226
 //=============================================================================
1170 1227
 //============================= Additional Features ===========================
1171 1228
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/delta/generic/Configuration.h Voir le fichier

@@ -949,7 +949,7 @@
949 949
 //===========================================================================
950 950
 //=============================== Bed Leveling ==============================
951 951
 //===========================================================================
952
-// @section bedlevel
952
+// @section calibrate
953 953
 
954 954
 /**
955 955
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1160,6 +1160,63 @@
1160 1160
 // Delta only homes to Z
1161 1161
 #define HOMING_FEEDRATE_Z  (200*60)
1162 1162
 
1163
+// @section calibrate
1164
+
1165
+/**
1166
+ * Bed Skew Compensation
1167
+ *
1168
+ * This feature corrects for misalignment in the XYZ axes.
1169
+ *
1170
+ * Take the following steps to get the bed skew in the XY plane:
1171
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1172
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1173
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1174
+ *  4. For XY_SIDE_AD measure the edge A to D
1175
+ *
1176
+ * Marlin automatically computes skew factors from these measurements.
1177
+ * Skew factors may also be computed and set manually:
1178
+ *
1179
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1180
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1181
+ *
1182
+ * If desired, follow the same procedure for XZ and YZ.
1183
+ * Use these diagrams for reference:
1184
+ *
1185
+ *    Y                     Z                     Z
1186
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1187
+ *    |    /       /        |    /       /        |    /       /
1188
+ *    |   /       /         |   /       /         |   /       /
1189
+ *    |  A-------D          |  A-------D          |  A-------D
1190
+ *    +-------------->X     +-------------->X     +-------------->Y
1191
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1192
+ */
1193
+//#define SKEW_CORRECTION
1194
+
1195
+#if ENABLED(SKEW_CORRECTION)
1196
+  // Input all length measurements here:
1197
+  #define XY_DIAG_AC 282.8427124746
1198
+  #define XY_DIAG_BD 282.8427124746
1199
+  #define XY_SIDE_AD 200
1200
+
1201
+  // Or, set the default skew factors directly here
1202
+  // to override the above measurements:
1203
+  #define XY_SKEW_FACTOR 0.0
1204
+
1205
+  //#define SKEW_CORRECTION_FOR_Z
1206
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1207
+    #define XZ_DIAG_AC 282.8427124746
1208
+    #define XZ_DIAG_BD 282.8427124746
1209
+    #define YZ_DIAG_AC 282.8427124746
1210
+    #define YZ_DIAG_BD 282.8427124746
1211
+    #define YZ_SIDE_AD 200
1212
+    #define XZ_SKEW_FACTOR 0.0
1213
+    #define YZ_SKEW_FACTOR 0.0
1214
+  #endif
1215
+
1216
+  // Enable this option for M852 to set skew at runtime
1217
+  //#define SKEW_CORRECTION_GCODE
1218
+#endif
1219
+
1163 1220
 //=============================================================================
1164 1221
 //============================= Additional Features ===========================
1165 1222
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/delta/kossel_mini/Configuration.h Voir le fichier

@@ -952,7 +952,7 @@
952 952
 //===========================================================================
953 953
 //=============================== Bed Leveling ==============================
954 954
 //===========================================================================
955
-// @section bedlevel
955
+// @section calibrate
956 956
 
957 957
 /**
958 958
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1163,6 +1163,63 @@
1163 1163
 // Delta only homes to Z
1164 1164
 #define HOMING_FEEDRATE_Z  (200*60)
1165 1165
 
1166
+// @section calibrate
1167
+
1168
+/**
1169
+ * Bed Skew Compensation
1170
+ *
1171
+ * This feature corrects for misalignment in the XYZ axes.
1172
+ *
1173
+ * Take the following steps to get the bed skew in the XY plane:
1174
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1175
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1176
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1177
+ *  4. For XY_SIDE_AD measure the edge A to D
1178
+ *
1179
+ * Marlin automatically computes skew factors from these measurements.
1180
+ * Skew factors may also be computed and set manually:
1181
+ *
1182
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1183
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1184
+ *
1185
+ * If desired, follow the same procedure for XZ and YZ.
1186
+ * Use these diagrams for reference:
1187
+ *
1188
+ *    Y                     Z                     Z
1189
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1190
+ *    |    /       /        |    /       /        |    /       /
1191
+ *    |   /       /         |   /       /         |   /       /
1192
+ *    |  A-------D          |  A-------D          |  A-------D
1193
+ *    +-------------->X     +-------------->X     +-------------->Y
1194
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1195
+ */
1196
+//#define SKEW_CORRECTION
1197
+
1198
+#if ENABLED(SKEW_CORRECTION)
1199
+  // Input all length measurements here:
1200
+  #define XY_DIAG_AC 282.8427124746
1201
+  #define XY_DIAG_BD 282.8427124746
1202
+  #define XY_SIDE_AD 200
1203
+
1204
+  // Or, set the default skew factors directly here
1205
+  // to override the above measurements:
1206
+  #define XY_SKEW_FACTOR 0.0
1207
+
1208
+  //#define SKEW_CORRECTION_FOR_Z
1209
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1210
+    #define XZ_DIAG_AC 282.8427124746
1211
+    #define XZ_DIAG_BD 282.8427124746
1212
+    #define YZ_DIAG_AC 282.8427124746
1213
+    #define YZ_DIAG_BD 282.8427124746
1214
+    #define YZ_SIDE_AD 200
1215
+    #define XZ_SKEW_FACTOR 0.0
1216
+    #define YZ_SKEW_FACTOR 0.0
1217
+  #endif
1218
+
1219
+  // Enable this option for M852 to set skew at runtime
1220
+  //#define SKEW_CORRECTION_GCODE
1221
+#endif
1222
+
1166 1223
 //=============================================================================
1167 1224
 //============================= Additional Features ===========================
1168 1225
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/delta/kossel_pro/Configuration.h Voir le fichier

@@ -952,7 +952,7 @@
952 952
 //===========================================================================
953 953
 //=============================== Bed Leveling ==============================
954 954
 //===========================================================================
955
-// @section bedlevel
955
+// @section calibrate
956 956
 
957 957
 /**
958 958
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1163,6 +1163,63 @@
1163 1163
 // Delta only homes to Z
1164 1164
 #define HOMING_FEEDRATE_Z  (200*60)
1165 1165
 
1166
+// @section calibrate
1167
+
1168
+/**
1169
+ * Bed Skew Compensation
1170
+ *
1171
+ * This feature corrects for misalignment in the XYZ axes.
1172
+ *
1173
+ * Take the following steps to get the bed skew in the XY plane:
1174
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1175
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1176
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1177
+ *  4. For XY_SIDE_AD measure the edge A to D
1178
+ *
1179
+ * Marlin automatically computes skew factors from these measurements.
1180
+ * Skew factors may also be computed and set manually:
1181
+ *
1182
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1183
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1184
+ *
1185
+ * If desired, follow the same procedure for XZ and YZ.
1186
+ * Use these diagrams for reference:
1187
+ *
1188
+ *    Y                     Z                     Z
1189
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1190
+ *    |    /       /        |    /       /        |    /       /
1191
+ *    |   /       /         |   /       /         |   /       /
1192
+ *    |  A-------D          |  A-------D          |  A-------D
1193
+ *    +-------------->X     +-------------->X     +-------------->Y
1194
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1195
+ */
1196
+//#define SKEW_CORRECTION
1197
+
1198
+#if ENABLED(SKEW_CORRECTION)
1199
+  // Input all length measurements here:
1200
+  #define XY_DIAG_AC 282.8427124746
1201
+  #define XY_DIAG_BD 282.8427124746
1202
+  #define XY_SIDE_AD 200
1203
+
1204
+  // Or, set the default skew factors directly here
1205
+  // to override the above measurements:
1206
+  #define XY_SKEW_FACTOR 0.0
1207
+
1208
+  //#define SKEW_CORRECTION_FOR_Z
1209
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1210
+    #define XZ_DIAG_AC 282.8427124746
1211
+    #define XZ_DIAG_BD 282.8427124746
1212
+    #define YZ_DIAG_AC 282.8427124746
1213
+    #define YZ_DIAG_BD 282.8427124746
1214
+    #define YZ_SIDE_AD 200
1215
+    #define XZ_SKEW_FACTOR 0.0
1216
+    #define YZ_SKEW_FACTOR 0.0
1217
+  #endif
1218
+
1219
+  // Enable this option for M852 to set skew at runtime
1220
+  //#define SKEW_CORRECTION_GCODE
1221
+#endif
1222
+
1166 1223
 //=============================================================================
1167 1224
 //============================= Additional Features ===========================
1168 1225
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/delta/kossel_xl/Configuration.h Voir le fichier

@@ -961,7 +961,7 @@
961 961
 //===========================================================================
962 962
 //=============================== Bed Leveling ==============================
963 963
 //===========================================================================
964
-// @section bedlevel
964
+// @section calibrate
965 965
 
966 966
 /**
967 967
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1172,6 +1172,63 @@
1172 1172
 // Delta only homes to Z
1173 1173
 #define HOMING_FEEDRATE_Z  (60*60)
1174 1174
 
1175
+// @section calibrate
1176
+
1177
+/**
1178
+ * Bed Skew Compensation
1179
+ *
1180
+ * This feature corrects for misalignment in the XYZ axes.
1181
+ *
1182
+ * Take the following steps to get the bed skew in the XY plane:
1183
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1184
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1185
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1186
+ *  4. For XY_SIDE_AD measure the edge A to D
1187
+ *
1188
+ * Marlin automatically computes skew factors from these measurements.
1189
+ * Skew factors may also be computed and set manually:
1190
+ *
1191
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1192
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1193
+ *
1194
+ * If desired, follow the same procedure for XZ and YZ.
1195
+ * Use these diagrams for reference:
1196
+ *
1197
+ *    Y                     Z                     Z
1198
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1199
+ *    |    /       /        |    /       /        |    /       /
1200
+ *    |   /       /         |   /       /         |   /       /
1201
+ *    |  A-------D          |  A-------D          |  A-------D
1202
+ *    +-------------->X     +-------------->X     +-------------->Y
1203
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1204
+ */
1205
+//#define SKEW_CORRECTION
1206
+
1207
+#if ENABLED(SKEW_CORRECTION)
1208
+  // Input all length measurements here:
1209
+  #define XY_DIAG_AC 282.8427124746
1210
+  #define XY_DIAG_BD 282.8427124746
1211
+  #define XY_SIDE_AD 200
1212
+
1213
+  // Or, set the default skew factors directly here
1214
+  // to override the above measurements:
1215
+  #define XY_SKEW_FACTOR 0.0
1216
+
1217
+  //#define SKEW_CORRECTION_FOR_Z
1218
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1219
+    #define XZ_DIAG_AC 282.8427124746
1220
+    #define XZ_DIAG_BD 282.8427124746
1221
+    #define YZ_DIAG_AC 282.8427124746
1222
+    #define YZ_DIAG_BD 282.8427124746
1223
+    #define YZ_SIDE_AD 200
1224
+    #define XZ_SKEW_FACTOR 0.0
1225
+    #define YZ_SKEW_FACTOR 0.0
1226
+  #endif
1227
+
1228
+  // Enable this option for M852 to set skew at runtime
1229
+  //#define SKEW_CORRECTION_GCODE
1230
+#endif
1231
+
1175 1232
 //=============================================================================
1176 1233
 //============================= Additional Features ===========================
1177 1234
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h Voir le fichier

@@ -846,7 +846,7 @@
846 846
 //===========================================================================
847 847
 //=============================== Bed Leveling ==============================
848 848
 //===========================================================================
849
-// @section bedlevel
849
+// @section calibrate
850 850
 
851 851
 /**
852 852
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1053,6 +1053,63 @@
1053 1053
 #define HOMING_FEEDRATE_XY (60*60)
1054 1054
 #define HOMING_FEEDRATE_Z  (14*60)
1055 1055
 
1056
+// @section calibrate
1057
+
1058
+/**
1059
+ * Bed Skew Compensation
1060
+ *
1061
+ * This feature corrects for misalignment in the XYZ axes.
1062
+ *
1063
+ * Take the following steps to get the bed skew in the XY plane:
1064
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1065
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1066
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1067
+ *  4. For XY_SIDE_AD measure the edge A to D
1068
+ *
1069
+ * Marlin automatically computes skew factors from these measurements.
1070
+ * Skew factors may also be computed and set manually:
1071
+ *
1072
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1073
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1074
+ *
1075
+ * If desired, follow the same procedure for XZ and YZ.
1076
+ * Use these diagrams for reference:
1077
+ *
1078
+ *    Y                     Z                     Z
1079
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1080
+ *    |    /       /        |    /       /        |    /       /
1081
+ *    |   /       /         |   /       /         |   /       /
1082
+ *    |  A-------D          |  A-------D          |  A-------D
1083
+ *    +-------------->X     +-------------->X     +-------------->Y
1084
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1085
+ */
1086
+//#define SKEW_CORRECTION
1087
+
1088
+#if ENABLED(SKEW_CORRECTION)
1089
+  // Input all length measurements here:
1090
+  #define XY_DIAG_AC 282.8427124746
1091
+  #define XY_DIAG_BD 282.8427124746
1092
+  #define XY_SIDE_AD 200
1093
+
1094
+  // Or, set the default skew factors directly here
1095
+  // to override the above measurements:
1096
+  #define XY_SKEW_FACTOR 0.0
1097
+
1098
+  //#define SKEW_CORRECTION_FOR_Z
1099
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1100
+    #define XZ_DIAG_AC 282.8427124746
1101
+    #define XZ_DIAG_BD 282.8427124746
1102
+    #define YZ_DIAG_AC 282.8427124746
1103
+    #define YZ_DIAG_BD 282.8427124746
1104
+    #define YZ_SIDE_AD 200
1105
+    #define XZ_SKEW_FACTOR 0.0
1106
+    #define YZ_SKEW_FACTOR 0.0
1107
+  #endif
1108
+
1109
+  // Enable this option for M852 to set skew at runtime
1110
+  //#define SKEW_CORRECTION_GCODE
1111
+#endif
1112
+
1056 1113
 //=============================================================================
1057 1114
 //============================= Additional Features ===========================
1058 1115
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/makibox/Configuration.h Voir le fichier

@@ -835,7 +835,7 @@
835 835
 //===========================================================================
836 836
 //=============================== Bed Leveling ==============================
837 837
 //===========================================================================
838
-// @section bedlevel
838
+// @section calibrate
839 839
 
840 840
 /**
841 841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1042,6 +1042,63 @@
1042 1042
 #define HOMING_FEEDRATE_XY 1500
1043 1043
 #define HOMING_FEEDRATE_Z  (2*60)
1044 1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1045 1102
 //=============================================================================
1046 1103
 //============================= Additional Features ===========================
1047 1104
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/tvrrug/Round2/Configuration.h Voir le fichier

@@ -827,7 +827,7 @@
827 827
 //===========================================================================
828 828
 //=============================== Bed Leveling ==============================
829 829
 //===========================================================================
830
-// @section bedlevel
830
+// @section calibrate
831 831
 
832 832
 /**
833 833
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1034,6 +1034,63 @@
1034 1034
 #define HOMING_FEEDRATE_XY (50*60)
1035 1035
 #define HOMING_FEEDRATE_Z  (4*60)
1036 1036
 
1037
+// @section calibrate
1038
+
1039
+/**
1040
+ * Bed Skew Compensation
1041
+ *
1042
+ * This feature corrects for misalignment in the XYZ axes.
1043
+ *
1044
+ * Take the following steps to get the bed skew in the XY plane:
1045
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1046
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1047
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1048
+ *  4. For XY_SIDE_AD measure the edge A to D
1049
+ *
1050
+ * Marlin automatically computes skew factors from these measurements.
1051
+ * Skew factors may also be computed and set manually:
1052
+ *
1053
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1054
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1055
+ *
1056
+ * If desired, follow the same procedure for XZ and YZ.
1057
+ * Use these diagrams for reference:
1058
+ *
1059
+ *    Y                     Z                     Z
1060
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1061
+ *    |    /       /        |    /       /        |    /       /
1062
+ *    |   /       /         |   /       /         |   /       /
1063
+ *    |  A-------D          |  A-------D          |  A-------D
1064
+ *    +-------------->X     +-------------->X     +-------------->Y
1065
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1066
+ */
1067
+//#define SKEW_CORRECTION
1068
+
1069
+#if ENABLED(SKEW_CORRECTION)
1070
+  // Input all length measurements here:
1071
+  #define XY_DIAG_AC 282.8427124746
1072
+  #define XY_DIAG_BD 282.8427124746
1073
+  #define XY_SIDE_AD 200
1074
+
1075
+  // Or, set the default skew factors directly here
1076
+  // to override the above measurements:
1077
+  #define XY_SKEW_FACTOR 0.0
1078
+
1079
+  //#define SKEW_CORRECTION_FOR_Z
1080
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1081
+    #define XZ_DIAG_AC 282.8427124746
1082
+    #define XZ_DIAG_BD 282.8427124746
1083
+    #define YZ_DIAG_AC 282.8427124746
1084
+    #define YZ_DIAG_BD 282.8427124746
1085
+    #define YZ_SIDE_AD 200
1086
+    #define XZ_SKEW_FACTOR 0.0
1087
+    #define YZ_SKEW_FACTOR 0.0
1088
+  #endif
1089
+
1090
+  // Enable this option for M852 to set skew at runtime
1091
+  //#define SKEW_CORRECTION_GCODE
1092
+#endif
1093
+
1037 1094
 //=============================================================================
1038 1095
 //============================= Additional Features ===========================
1039 1096
 //=============================================================================

+ 58
- 1
Marlin/src/config/examples/wt150/Configuration.h Voir le fichier

@@ -837,7 +837,7 @@
837 837
 //===========================================================================
838 838
 //=============================== Bed Leveling ==============================
839 839
 //===========================================================================
840
-// @section bedlevel
840
+// @section calibrate
841 841
 
842 842
 /**
843 843
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1044,6 +1044,63 @@
1044 1044
 #define HOMING_FEEDRATE_XY (50*60)
1045 1045
 #define HOMING_FEEDRATE_Z  (4*60)
1046 1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047 1104
 //=============================================================================
1048 1105
 //============================= Additional Features ===========================
1049 1106
 //=============================================================================

+ 3
- 1
Marlin/src/core/language.h Voir le fichier

@@ -130,7 +130,6 @@
130 130
 #define MSG_ERR_LINE_NO                     "Line Number is not Last Line Number+1, Last Line: "
131 131
 #define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "
132 132
 #define MSG_ERR_NO_CHECKSUM                 "No Checksum with line number, Last Line: "
133
-#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
134 133
 #define MSG_FILE_PRINTED                    "Done printing file"
135 134
 #define MSG_BEGIN_FILE_LIST                 "Begin file list"
136 135
 #define MSG_END_FILE_LIST                   "End file list"
@@ -163,6 +162,9 @@
163 162
 #define MSG_Z2_MAX                          "z2_max: "
164 163
 #define MSG_Z_PROBE                         "z_probe: "
165 164
 #define MSG_PROBE_Z_OFFSET                  "Probe Z Offset"
165
+#define MSG_SKEW_MIN                        "min_skew_factor: "
166
+#define MSG_SKEW_MAX                        "max_skew_factor: "
167
+#define MSG_SKEW_WARN                       "WARNING: Skew compensation disabled (outside MIN/MAX limits)"
166 168
 #define MSG_FILAMENT_RUNOUT_SENSOR          "filament: "
167 169
 #define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
168 170
 #define MSG_ERR_M355_NONE                   "No case light"

+ 89
- 0
Marlin/src/gcode/calibrate/M852.cpp Voir le fichier

@@ -0,0 +1,89 @@
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
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(SKEW_CORRECTION_GCODE)
26
+
27
+#include "../gcode.h"
28
+#include "../../module/planner.h"
29
+
30
+/**
31
+ * M852: Get or set the machine skew factors. Reports current values with no arguments.
32
+ *
33
+ *  S[xy_factor] - Alias for 'I'
34
+ *  I[xy_factor] - New XY skew factor
35
+ *  J[xz_factor] - New XZ skew factor
36
+ *  K[yz_factor] - New YZ skew factor
37
+ */
38
+void GcodeSuite::M852() {
39
+  const bool ijk = parser.seen('I') || parser.seen('S')
40
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
41
+      || parser.seen('J') || parser.seen('K')
42
+    #endif
43
+  ;
44
+  bool badval = false;
45
+
46
+  if (parser.seen('I') || parser.seen('S')) {
47
+    const float value = parser.value_linear_units();
48
+    if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
49
+      planner.xy_skew_factor = value;
50
+    else
51
+      badval = true;
52
+  }
53
+
54
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
55
+
56
+    if (parser.seen('J')) {
57
+      const float value = parser.value_linear_units();
58
+      if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
59
+        planner.xz_skew_factor = value;
60
+      else
61
+        badval = true;
62
+    }
63
+
64
+    if (parser.seen('K')) {
65
+      const float value = parser.value_linear_units();
66
+      if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
67
+        planner.yz_skew_factor = value;
68
+      else
69
+        badval = true;
70
+    }
71
+
72
+  #endif
73
+
74
+  if (badval)
75
+    SERIAL_ECHOLNPGM(MSG_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " MSG_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX));
76
+
77
+  if (!ijk) {
78
+    SERIAL_ECHO_START();
79
+    SERIAL_ECHOPAIR(MSG_SKEW_FACTOR " XY: ", planner.xy_skew_factor);
80
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
81
+      SERIAL_ECHOPAIR(" XZ: ", planner.xz_skew_factor);
82
+      SERIAL_ECHOLNPAIR(" YZ: ", planner.yz_skew_factor);
83
+    #else
84
+      SERIAL_EOL();
85
+    #endif
86
+  }
87
+}
88
+
89
+#endif // SKEW_CORRECTION_GCODE

+ 6
- 0
Marlin/src/gcode/gcode.cpp Voir le fichier

@@ -622,6 +622,12 @@ void GcodeSuite::process_parsed_command() {
622 622
           break;
623 623
       #endif // HAS_BED_PROBE
624 624
 
625
+      #if ENABLED(SKEW_CORRECTION_GCODE)
626
+        case 852: // M852: Set Skew factors
627
+          M852();
628
+          break;
629
+      #endif
630
+
625 631
       #if ENABLED(ADVANCED_PAUSE_FEATURE)
626 632
         case 600: // M600: Pause for filament change
627 633
           M600();

+ 5
- 0
Marlin/src/gcode/gcode.h Voir le fichier

@@ -201,6 +201,7 @@
201 201
  * M666 - Set delta endstop adjustment. (Requires DELTA)
202 202
  * M605 - Set dual x-carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
203 203
  * M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
204
+ * M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
204 205
  * M860 - Report the position of position encoder modules.
205 206
  * M861 - Report the status of position encoder modules.
206 207
  * M862 - Perform an axis continuity test for position encoder modules.
@@ -705,6 +706,10 @@ private:
705 706
     static void M851();
706 707
   #endif
707 708
 
709
+  #if ENABLED(SKEW_CORRECTION_GCODE)
710
+    static void M852();
711
+  #endif
712
+
708 713
   #if ENABLED(I2C_POSITION_ENCODERS)
709 714
     FORCE_INLINE static void M860() { I2CPEM.M860(); }
710 715
     FORCE_INLINE static void M861() { I2CPEM.M861(); }

+ 43
- 0
Marlin/src/inc/Conditionals_post.h Voir le fichier

@@ -889,6 +889,49 @@
889 889
 #endif
890 890
 
891 891
 /**
892
+ * XYZ Bed Skew Correction
893
+ */
894
+#if ENABLED(SKEW_CORRECTION)
895
+  #define SKEW_FACTOR_MIN -1
896
+  #define SKEW_FACTOR_MAX 1
897
+
898
+  #define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
899
+  #define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
900
+  #define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
901
+
902
+  #ifndef XY_SKEW_FACTOR
903
+    constexpr float XY_SKEW_FACTOR = (
904
+      #if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
905
+        _SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
906
+      #else
907
+        0.0
908
+      #endif
909
+    );
910
+  #endif
911
+  #ifndef XZ_SKEW_FACTOR
912
+    #if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
913
+      #define XZ_SIDE_AD XY_SIDE_AD
914
+    #endif
915
+    constexpr float XZ_SKEW_FACTOR = (
916
+      #if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
917
+        _SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
918
+      #else
919
+        0.0
920
+      #endif
921
+    );
922
+  #endif
923
+  #ifndef YZ_SKEW_FACTOR
924
+    constexpr float YZ_SKEW_FACTOR = (
925
+      #if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
926
+        _SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
927
+      #else
928
+        0.0
929
+      #endif
930
+    );
931
+  #endif
932
+#endif // SKEW_CORRECTION
933
+
934
+/**
892 935
  * Heater & Fan Pausing
893 936
  */
894 937
 #if FAN_COUNT == 0

+ 14
- 0
Marlin/src/inc/SanityCheck.h Voir le fichier

@@ -1483,4 +1483,18 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m
1483 1483
   #error "LED_CONTROL_MENU requires an LCD controller."
1484 1484
 #endif
1485 1485
 
1486
+#if ENABLED(SKEW_CORRECTION)
1487
+  #if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
1488
+    #error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
1489
+  #endif
1490
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1491
+    #if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
1492
+      #error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
1493
+    #endif
1494
+    #if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
1495
+      #error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
1496
+    #endif
1497
+  #endif
1498
+#endif
1499
+
1486 1500
 #endif // _SANITYCHECK_H_

+ 3
- 0
Marlin/src/lcd/language/language_en.h Voir le fichier

@@ -698,6 +698,9 @@
698 698
 #ifndef MSG_ZPROBE_OUT
699 699
   #define MSG_ZPROBE_OUT                      _UxGT("Z probe out. bed")
700 700
 #endif
701
+#ifndef MSG_SKEW_FACTOR
702
+  #define MSG_SKEW_FACTOR                     _UxGT("Skew Factor")
703
+#endif
701 704
 #ifndef MSG_BLTOUCH
702 705
   #define MSG_BLTOUCH                         _UxGT("BLTouch")
703 706
 #endif

+ 69
- 4
Marlin/src/module/configuration_store.cpp Voir le fichier

@@ -36,13 +36,13 @@
36 36
  *
37 37
  */
38 38
 
39
-#define EEPROM_VERSION "V45"
39
+#define EEPROM_VERSION "V46"
40 40
 
41 41
 // Change EEPROM version if these are changed:
42 42
 #define EEPROM_OFFSET 100
43 43
 
44 44
 /**
45
- * V45 EEPROM Layout:
45
+ * V46 EEPROM Layout:
46 46
  *
47 47
  *  100  Version                                    (char x4)
48 48
  *  104  EEPROM CRC16                               (uint16_t)
@@ -166,8 +166,13 @@
166 166
  * CNC_COORDINATE_SYSTEMS                           108 bytes
167 167
  *  602  G54-G59.3 coordinate_system                (float x 27)
168 168
  *
169
- *  710                                   Minimum end-point
170
- * 2239 (710 + 208 + 36 + 9 + 288 + 988)  Maximum end-point
169
+ * SKEW_CORRECTION:                                 12 bytes
170
+ *  710  M852 I    planner.xy_skew_factor           (float)
171
+ *  714  M852 J    planner.xz_skew_factor           (float)
172
+ *  718  M852 K    planner.yz_skew_factor           (float)
173
+ *
174
+ *  722                                   Minimum end-point
175
+ * 2251 (722 + 208 + 36 + 9 + 288 + 988)  Maximum end-point
171 176
  *
172 177
  * ========================================================================
173 178
  * meshes_begin (between max and min end-point, directly above)
@@ -633,6 +638,10 @@ void MarlinSettings::postprocess() {
633 638
       for (uint8_t q = 3; q--;) EEPROM_WRITE(dummyui32);
634 639
     #endif
635 640
 
641
+    //
642
+    // CNC Coordinate Systems
643
+    //
644
+
636 645
     #if ENABLED(CNC_COORDINATE_SYSTEMS)
637 646
       EEPROM_WRITE(coordinate_system); // 27 floats
638 647
     #else
@@ -640,6 +649,19 @@ void MarlinSettings::postprocess() {
640 649
       for (uint8_t q = 27; q--;) EEPROM_WRITE(dummy);
641 650
     #endif
642 651
 
652
+    //
653
+    // Skew correction factors
654
+    //
655
+
656
+    #if ENABLED(SKEW_CORRECTION)
657
+      EEPROM_WRITE(planner.xy_skew_factor);
658
+      EEPROM_WRITE(planner.xz_skew_factor);
659
+      EEPROM_WRITE(planner.yz_skew_factor);
660
+    #else
661
+      dummy = 0.0f;
662
+      for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
663
+    #endif
664
+
643 665
     if (!eeprom_error) {
644 666
       #if ENABLED(EEPROM_CHITCHAT)
645 667
         const int eeprom_size = eeprom_index;
@@ -1078,6 +1100,23 @@ void MarlinSettings::postprocess() {
1078 1100
         for (uint8_t q = 27; q--;) EEPROM_READ(dummy);
1079 1101
       #endif
1080 1102
 
1103
+      //
1104
+      // Skew correction factors
1105
+      //
1106
+
1107
+      #if ENABLED(SKEW_CORRECTION_GCODE)
1108
+        EEPROM_READ(planner.xy_skew_factor);
1109
+        #if ENABLED(SKEW_CORRECTION_FOR_Z)
1110
+          EEPROM_READ(planner.xz_skew_factor);
1111
+          EEPROM_READ(planner.yz_skew_factor);
1112
+        #else
1113
+          EEPROM_READ(dummy);
1114
+          EEPROM_READ(dummy);
1115
+        #endif
1116
+      #else
1117
+        for (uint8_t q = 3; q--;) EEPROM_READ(dummy);
1118
+      #endif
1119
+
1081 1120
       if (working_crc == stored_crc) {
1082 1121
         postprocess();
1083 1122
         #if ENABLED(EEPROM_CHITCHAT)
@@ -1463,6 +1502,14 @@ void MarlinSettings::reset() {
1463 1502
     ubl.reset();
1464 1503
   #endif
1465 1504
 
1505
+  #if ENABLED(SKEW_CORRECTION_GCODE)
1506
+    planner.xy_skew_factor = XY_SKEW_FACTOR;
1507
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
1508
+      planner.xz_skew_factor = XZ_SKEW_FACTOR;
1509
+      planner.yz_skew_factor = YZ_SKEW_FACTOR;
1510
+    #endif
1511
+  #endif
1512
+
1466 1513
   postprocess();
1467 1514
 
1468 1515
   #if ENABLED(EEPROM_CHITCHAT)
@@ -1888,6 +1935,24 @@ void MarlinSettings::reset() {
1888 1935
     #endif
1889 1936
 
1890 1937
     /**
1938
+     * Bed Skew Correction
1939
+     */
1940
+    #if ENABLED(SKEW_CORRECTION_GCODE)
1941
+      if (!forReplay) {
1942
+        CONFIG_ECHO_START;
1943
+        SERIAL_ECHOLNPGM("Skew Factor: ");
1944
+      }
1945
+      CONFIG_ECHO_START;
1946
+      #if ENABLED(SKEW_CORRECTION_FOR_Z)
1947
+        SERIAL_ECHOPAIR("  M852 I", LINEAR_UNIT(planner.xy_skew_factor));
1948
+        SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.xz_skew_factor));
1949
+        SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(planner.yz_skew_factor));
1950
+      #else
1951
+        SERIAL_ECHOLNPAIR("  M852 S", LINEAR_UNIT(planner.xy_skew_factor));
1952
+      #endif
1953
+    #endif
1954
+
1955
+    /**
1891 1956
      * TMC2130 stepper driver current
1892 1957
      */
1893 1958
     #if ENABLED(HAVE_TMC2130)

+ 81
- 34
Marlin/src/module/planner.cpp Voir le fichier

@@ -135,6 +135,20 @@ float Planner::min_feedrate_mm_s,
135 135
   #endif
136 136
 #endif
137 137
 
138
+#if ENABLED(SKEW_CORRECTION)
139
+  #if ENABLED(SKEW_CORRECTION_GCODE)
140
+    // Initialized by settings.load()
141
+    float Planner::xy_skew_factor;
142
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
143
+      float Planner::xz_skew_factor, Planner::yz_skew_factor;
144
+    #else
145
+      constexpr float Planner::xz_skew_factor, Planner::yz_skew_factor;
146
+    #endif
147
+  #else
148
+    constexpr float Planner::xy_skew_factor, Planner::xz_skew_factor, Planner::yz_skew_factor;
149
+  #endif
150
+#endif
151
+
138 152
 #if ENABLED(AUTOTEMP)
139 153
   float Planner::autotemp_max = 250,
140 154
         Planner::autotemp_min = 210,
@@ -565,6 +579,19 @@ void Planner::calculate_volumetric_multipliers() {
565 579
    */
566 580
   void Planner::apply_leveling(float &rx, float &ry, float &rz) {
567 581
 
582
+    #if ENABLED(SKEW_CORRECTION)
583
+      if (WITHIN(rx, X_MIN_POS + 1, X_MAX_POS) && WITHIN(ry, Y_MIN_POS + 1, Y_MAX_POS)) {
584
+        const float tempry = ry - (rz * planner.yz_skew_factor),
585
+                    temprx = rx - (ry * planner.xy_skew_factor) - (rz * (planner.xz_skew_factor - (planner.xy_skew_factor * planner.yz_skew_factor)));
586
+        if (WITHIN(temprx, X_MIN_POS, X_MAX_POS) && WITHIN(tempry, Y_MIN_POS, Y_MAX_POS)) {
587
+          rx = temprx;
588
+          ry = tempry;
589
+        }
590
+        else
591
+          SERIAL_ECHOLN(MSG_SKEW_WARN);
592
+      }
593
+    #endif
594
+
568 595
     if (!leveling_active) return;
569 596
 
570 597
     #if ABL_PLANAR
@@ -611,45 +638,56 @@ void Planner::calculate_volumetric_multipliers() {
611 638
 
612 639
   void Planner::unapply_leveling(float raw[XYZ]) {
613 640
 
614
-    if (!leveling_active) return;
641
+    #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
642
+      const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]);
643
+    #else
644
+      constexpr float fade_scaling_factor = 1.0;
645
+    #endif
615 646
 
616
-    #if ABL_PLANAR
647
+    if (leveling_active && fade_scaling_factor) {
617 648
 
618
-      matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix);
649
+      #if ABL_PLANAR
619 650
 
620
-      float dx = raw[X_AXIS] - (X_TILT_FULCRUM),
621
-            dy = raw[Y_AXIS] - (Y_TILT_FULCRUM);
651
+        matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix);
622 652
 
623
-      apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]);
653
+        float dx = raw[X_AXIS] - (X_TILT_FULCRUM),
654
+              dy = raw[Y_AXIS] - (Y_TILT_FULCRUM);
624 655
 
625
-      raw[X_AXIS] = dx + X_TILT_FULCRUM;
626
-      raw[Y_AXIS] = dy + Y_TILT_FULCRUM;
656
+        apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]);
627 657
 
628
-    #else
658
+        raw[X_AXIS] = dx + X_TILT_FULCRUM;
659
+        raw[Y_AXIS] = dy + Y_TILT_FULCRUM;
629 660
 
630
-      #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
631
-        const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]);
632
-        if (!fade_scaling_factor) return;
633
-      #elif HAS_MESH
634
-        constexpr float fade_scaling_factor = 1.0;
635
-      #endif
661
+      #else // !ABL_PLANAR
636 662
 
637
-      raw[Z_AXIS] -= (
638
-        #if ENABLED(AUTO_BED_LEVELING_UBL)
639
-          ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor
640
-        #elif ENABLED(MESH_BED_LEVELING)
641
-          mbl.get_z(raw[X_AXIS], raw[Y_AXIS]
642
-            #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
643
-              , fade_scaling_factor
644
-            #endif
645
-          )
646
-        #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
647
-          bilinear_z_offset(raw) * fade_scaling_factor
648
-        #else
649
-          0
650
-        #endif
651
-      );
663
+        raw[Z_AXIS] -= (
664
+          #if ENABLED(AUTO_BED_LEVELING_UBL)
665
+            ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor
666
+          #elif ENABLED(MESH_BED_LEVELING)
667
+            mbl.get_z(raw[X_AXIS], raw[Y_AXIS]
668
+              #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
669
+                , fade_scaling_factor
670
+              #endif
671
+            )
672
+          #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
673
+            bilinear_z_offset(raw) * fade_scaling_factor
674
+          #else
675
+            0
676
+          #endif
677
+        );
678
+
679
+      #endif // !ABL_PLANAR
680
+    }
652 681
 
682
+    #if ENABLED(SKEW_CORRECTION)
683
+      if (WITHIN(raw[X_AXIS], X_MIN_POS, X_MAX_POS) && WITHIN(raw[Y_AXIS], Y_MIN_POS, Y_MAX_POS)) {
684
+        const float temprx = raw[X_AXIS] + raw[Y_AXIS] * planner.xy_skew_factor + raw[Z_AXIS] * planner.xz_skew_factor,
685
+                    tempry = raw[Y_AXIS] + raw[Z_AXIS] * planner.yz_skew_factor;
686
+        if (WITHIN(temprx, X_MIN_POS, X_MAX_POS) && WITHIN(tempry, Y_MIN_POS, Y_MAX_POS)) {
687
+          raw[X_AXIS] = temprx;
688
+          raw[Y_AXIS] = tempry;
689
+        }
690
+      }
653 691
     #endif
654 692
   }
655 693
 
@@ -658,13 +696,13 @@ void Planner::calculate_volumetric_multipliers() {
658 696
 /**
659 697
  * Planner::_buffer_line
660 698
  *
661
- * Add a new linear movement to the buffer.
699
+ * Add a new linear movement to the buffer in axis units.
662 700
  *
663 701
  * Leveling and kinematics should be applied ahead of calling this.
664 702
  *
665
- *  a,b,c,e     - target positions in mm or degrees
666
- *  fr_mm_s     - (target) speed of the move
667
- *  extruder    - target extruder
703
+ *  a,b,c,e   - target positions in mm and/or degrees
704
+ *  fr_mm_s   - (target) speed of the move
705
+ *  extruder  - target extruder
668 706
  */
669 707
 void Planner::_buffer_line(const float &a, const float &b, const float &c, const float &e, float fr_mm_s, const uint8_t extruder) {
670 708
 
@@ -713,6 +751,10 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
713 751
   SERIAL_EOL();
714 752
   //*/
715 753
 
754
+  // DRYRUN ignores all temperature constraints and assures that the extruder is instantly satisfied
755
+  if (DEBUGGING(DRYRUN))
756
+    position[E_AXIS] = target[E_AXIS];
757
+
716 758
   int32_t de = target[E_AXIS] - position[E_AXIS];
717 759
 
718 760
   #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
@@ -736,6 +778,10 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
736 778
     }
737 779
   #endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE
738 780
 
781
+  #if ENABLED(LIN_ADVANCE)
782
+    float de_float = de * steps_to_mm[E_AXIS_N];
783
+  #endif
784
+
739 785
   // Compute direction bit-mask for this block
740 786
   uint8_t dm = 0;
741 787
   #if CORE_IS_XY
@@ -1332,6 +1378,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1332 1378
   previous_safe_speed = safe_speed;
1333 1379
 
1334 1380
   #if ENABLED(LIN_ADVANCE)
1381
+
1335 1382
     /**
1336 1383
      *
1337 1384
      * Use LIN_ADVANCE for blocks if all these are true:

+ 17
- 0
Marlin/src/module/planner.h Voir le fichier

@@ -180,6 +180,23 @@ class Planner {
180 180
       static float extruder_advance_k, advance_ed_ratio;
181 181
     #endif
182 182
 
183
+    #if ENABLED(SKEW_CORRECTION)
184
+      #if ENABLED(SKEW_CORRECTION_GCODE)
185
+        static float xy_skew_factor;
186
+      #else
187
+        static constexpr float xy_skew_factor = XY_SKEW_FACTOR;
188
+      #endif
189
+      #if ENABLED(SKEW_CORRECTION_FOR_Z)
190
+        #if ENABLED(SKEW_CORRECTION_GCODE)
191
+          static float xz_skew_factor, yz_skew_factor;
192
+        #else
193
+          static constexpr float xz_skew_factor = XZ_SKEW_FACTOR, yz_skew_factor = YZ_SKEW_FACTOR;
194
+        #endif
195
+      #else
196
+        static constexpr float xz_skew_factor = 0, yz_skew_factor = 0;
197
+      #endif
198
+    #endif
199
+
183 200
   private:
184 201
 
185 202
     /**

+ 1
- 1
Marlin/src/module/temperature.cpp Voir le fichier

@@ -1357,7 +1357,7 @@ void Temperature::init() {
1357 1357
     millis_t Temperature::thermal_runaway_bed_timer;
1358 1358
   #endif
1359 1359
 
1360
-  void Temperature::thermal_runaway_protection(Temperature::TRState* state, millis_t* timer, float current, float target, int heater_id, int period_seconds, int hysteresis_degc) {
1360
+  void Temperature::thermal_runaway_protection(Temperature::TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1361 1361
 
1362 1362
     static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1363 1363
 

+ 1
- 1
Marlin/src/module/temperature.h Voir le fichier

@@ -574,7 +574,7 @@ class Temperature {
574 574
 
575 575
       typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
576 576
 
577
-      static void thermal_runaway_protection(TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
577
+      static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
578 578
 
579 579
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
580 580
         static TRState thermal_runaway_state_machine[HOTENDS];

Chargement…
Annuler
Enregistrer