Add SKEW_CORRECTION to example configs
This commit is contained in:
		@@ -833,7 +833,7 @@
 | 
			
		||||
//===========================================================================
 | 
			
		||||
//=============================== Bed Leveling ==============================
 | 
			
		||||
//===========================================================================
 | 
			
		||||
// @section bedlevel
 | 
			
		||||
// @section calibrate
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Choose one of the options below to enable G29 Bed Leveling. The parameters
 | 
			
		||||
@@ -1040,6 +1040,63 @@
 | 
			
		||||
#define HOMING_FEEDRATE_XY (50*60)
 | 
			
		||||
#define HOMING_FEEDRATE_Z  (4*60)
 | 
			
		||||
 | 
			
		||||
// @section calibrate
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Bed Skew Compensation
 | 
			
		||||
 *
 | 
			
		||||
 * This feature corrects for misalignment in the XYZ axes.
 | 
			
		||||
 *
 | 
			
		||||
 * Take the following steps to get the bed skew in the XY plane:
 | 
			
		||||
 *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
 | 
			
		||||
 *  2. For XY_DIAG_AC measure the diagonal A to C
 | 
			
		||||
 *  3. For XY_DIAG_BD measure the diagonal B to D
 | 
			
		||||
 *  4. For XY_SIDE_AD measure the edge A to D
 | 
			
		||||
 *
 | 
			
		||||
 * Marlin automatically computes skew factors from these measurements.
 | 
			
		||||
 * Skew factors may also be computed and set manually:
 | 
			
		||||
 *
 | 
			
		||||
 *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
 | 
			
		||||
 *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
 | 
			
		||||
 *
 | 
			
		||||
 * If desired, follow the same procedure for XZ and YZ.
 | 
			
		||||
 * Use these diagrams for reference:
 | 
			
		||||
 *
 | 
			
		||||
 *    Y                     Z                     Z
 | 
			
		||||
 *    ^     B-------C       ^     B-------C       ^     B-------C
 | 
			
		||||
 *    |    /       /        |    /       /        |    /       /
 | 
			
		||||
 *    |   /       /         |   /       /         |   /       /
 | 
			
		||||
 *    |  A-------D          |  A-------D          |  A-------D
 | 
			
		||||
 *    +-------------->X     +-------------->X     +-------------->Y
 | 
			
		||||
 *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
 | 
			
		||||
 */
 | 
			
		||||
//#define SKEW_CORRECTION
 | 
			
		||||
 | 
			
		||||
#if ENABLED(SKEW_CORRECTION)
 | 
			
		||||
  // Input all length measurements here:
 | 
			
		||||
  #define XY_DIAG_AC 282.8427124746
 | 
			
		||||
  #define XY_DIAG_BD 282.8427124746
 | 
			
		||||
  #define XY_SIDE_AD 200
 | 
			
		||||
 | 
			
		||||
  // Or, set the default skew factors directly here
 | 
			
		||||
  // to override the above measurements:
 | 
			
		||||
  #define XY_SKEW_FACTOR 0.0
 | 
			
		||||
 | 
			
		||||
  //#define SKEW_CORRECTION_FOR_Z
 | 
			
		||||
  #if ENABLED(SKEW_CORRECTION_FOR_Z)
 | 
			
		||||
    #define XZ_DIAG_AC 282.8427124746
 | 
			
		||||
    #define XZ_DIAG_BD 282.8427124746
 | 
			
		||||
    #define YZ_DIAG_AC 282.8427124746
 | 
			
		||||
    #define YZ_DIAG_BD 282.8427124746
 | 
			
		||||
    #define YZ_SIDE_AD 200
 | 
			
		||||
    #define XZ_SKEW_FACTOR 0.0
 | 
			
		||||
    #define YZ_SKEW_FACTOR 0.0
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  // Enable this option for M852 to set skew at runtime
 | 
			
		||||
  //#define SKEW_CORRECTION_GCODE
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//============================= Additional Features ===========================
 | 
			
		||||
//=============================================================================
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user