@ -1348,12 +1348,7 @@
# endif
# endif
# endif
# endif
# else
# else
# undef X_PROBE_OFFSET_FROM_EXTRUDER
# undef NOZZLE_TO_PROBE_OFFSET
# undef Y_PROBE_OFFSET_FROM_EXTRUDER
# undef Z_PROBE_OFFSET_FROM_EXTRUDER
# define X_PROBE_OFFSET_FROM_EXTRUDER 0
# define Y_PROBE_OFFSET_FROM_EXTRUDER 0
# define Z_PROBE_OFFSET_FROM_EXTRUDER 0
# endif
# endif
/**
/**
@ -1446,10 +1441,13 @@
* Bed Probing rectangular bounds
* Bed Probing rectangular bounds
* These can be further constrained in code for Delta and SCARA
* These can be further constrained in code for Delta and SCARA
*/
*/
# ifndef MIN_PROBE_EDGE
# ifndef MIN_PROBE_EDGE
# define MIN_PROBE_EDGE 0
# define MIN_PROBE_EDGE 0
# endif
# endif
# ifndef NOZZLE_TO_PROBE_OFFSET
# define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
# endif
constexpr float nozzle_to_probe_offset [ XYZ ] = NOZZLE_TO_PROBE_OFFSET ;
# if ENABLED(DELTA)
# if ENABLED(DELTA)
/**
/**
@ -1457,8 +1455,8 @@
*/
*/
# define _PROBE_RADIUS (DELTA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# define _PROBE_RADIUS (DELTA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# ifndef DELTA_CALIBRATION_RADIUS
# ifndef DELTA_CALIBRATION_RADIUS
# ifdef X_PROBE_OFFSET_FROM_EXTRUDER
# ifdef NOZZLE_TO_PROBE_OFFSET
# define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - _MAX(ABS( X_PROBE_OFFSET_FROM_EXTRUDER), ABS(Y_PROBE_OFFSET_FROM_EXTRUDER ), ABS(MIN_PROBE_EDGE)))
# define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - _MAX(ABS( nozzle_to_probe_offset[X_AXIS]), ABS(nozzle_to_probe_offset[Y_AXIS] ), ABS(MIN_PROBE_EDGE)))
# else
# else
# define DELTA_CALIBRATION_RADIUS _PROBE_RADIUS
# define DELTA_CALIBRATION_RADIUS _PROBE_RADIUS
# endif
# endif
@ -1467,39 +1465,39 @@
# define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
# define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
# endif
# endif
# ifndef DELTA_TOWER_ANGLE_TRIM
# ifndef DELTA_TOWER_ANGLE_TRIM
# define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0}
# define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 }
# endif
# endif
# ifndef DELTA_RADIUS_TRIM_TOWER
# ifndef DELTA_RADIUS_TRIM_TOWER
# define DELTA_RADIUS_TRIM_TOWER { 0, 0, 0}
# define DELTA_RADIUS_TRIM_TOWER { 0, 0, 0 }
# endif
# endif
# ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER
# ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER
# define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0, 0, 0}
# define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0, 0, 0 }
# endif
# endif
// Probing points may be verified at compile time within the radius
// Probing points may be verified at compile time within the radius
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
// so that may be added to SanityCheck.h in the future.
// so that may be added to SanityCheck.h in the future.
# define _MIN_ PROBE_X (X_CENTER - (_PROBE_RADIUS))
# define PROBE_X_MIN (X_CENTER - (_PROBE_RADIUS))
# define _MIN_ PROBE_Y (Y_CENTER - (_PROBE_RADIUS))
# define PROBE_Y_MIN (Y_CENTER - (_PROBE_RADIUS))
# define _MAX_ PROBE_X (X_CENTER + _PROBE_RADIUS)
# define PROBE_X_MA X (X_CENTER + _PROBE_RADIUS)
# define _MAX_ PROBE_Y (Y_CENTER + _PROBE_RADIUS)
# define PROBE_Y_MAX (Y_CENTER + _PROBE_RADIUS)
# elif IS_SCARA
# elif IS_SCARA
# define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
# define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
# define _PROBE_RADIUS (SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# define _PROBE_RADIUS (SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# define _MIN_ PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
# define PROBE_X_MIN (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
# define _MIN_ PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
# define PROBE_Y_MIN (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MIN_PROBE_EDGE)
# define _MAX_ PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# define PROBE_X_MA X (X_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# define _MAX_ PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# define PROBE_Y_MAX (Y_CENTER + SCARA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
# else
# else
// Boundaries for Cartesian probing based on bed limits
// Boundaries for Cartesian probing based on bed limits
# define _MIN_PROBE_X (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER ))
# define PROBE_X_MIN (_MAX(X_MIN_BED + MIN_PROBE_EDGE, X_MIN_POS + nozzle_to_probe_offset[X_AXIS] ))
# define _MIN_PROBE_Y (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER ))
# define PROBE_Y_MIN (_MAX(Y_MIN_BED + MIN_PROBE_EDGE, Y_MIN_POS + nozzle_to_probe_offset[Y_AXIS] ))
# define _MAX_ PROBE_X (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER ))
# define PROBE_X_MA X (_MIN(X_MAX_BED - (MIN_PROBE_EDGE), X_MAX_POS + nozzle_to_probe_offset[X_AXIS] ))
# define _MAX_PROBE_Y (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER ))
# define PROBE_Y_MAX (_MIN(Y_MAX_BED - (MIN_PROBE_EDGE), Y_MAX_POS + nozzle_to_probe_offset[Y_AXIS] ))
# endif
# endif
@ -1507,20 +1505,6 @@
# define LEVELED_SEGMENT_LENGTH 5
# define LEVELED_SEGMENT_LENGTH 5
# endif
# endif
// These may be overridden in Configuration.h if a smaller area is desired
# ifndef MIN_PROBE_X
# define MIN_PROBE_X _MIN_PROBE_X
# endif
# ifndef MIN_PROBE_Y
# define MIN_PROBE_Y _MIN_PROBE_Y
# endif
# ifndef MAX_PROBE_X
# define MAX_PROBE_X _MAX_PROBE_X
# endif
# ifndef MAX_PROBE_Y
# define MAX_PROBE_Y _MAX_PROBE_Y
# endif
/**
/**
* Default mesh area is an area with an inset margin on the print area .
* Default mesh area is an area with an inset margin on the print area .
*/
*/
@ -1537,14 +1521,14 @@
// Boundaries for Cartesian probing based on set limits
// Boundaries for Cartesian probing based on set limits
# if ENABLED(AUTO_BED_LEVELING_UBL)
# if ENABLED(AUTO_BED_LEVELING_UBL)
# define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It does not
# define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It does not
# define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need *_PROBE_OFFSET_FROM_EXTRUDER in the mesh dimensions
# define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions
# define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS))
# define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS))
# define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS))
# define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS))
# else
# else
# define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER ))
# define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS + nozzle_to_probe_offset[X_AXIS] ))
# define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER ))
# define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS + nozzle_to_probe_offset[Y_AXIS] ))
# define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER ))
# define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS + nozzle_to_probe_offset[X_AXIS] ))
# define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER ))
# define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + nozzle_to_probe_offset[Y_AXIS] ))
# endif
# endif
# endif
# endif
@ -1592,38 +1576,23 @@
# endif
# endif
# else
# else
# ifndef PROBE_PT_1_X
# ifndef PROBE_PT_1_X
# define PROBE_PT_1_X MIN_ PROBE_X
# define PROBE_PT_1_X PROBE_X_MIN
# endif
# endif
# ifndef PROBE_PT_1_Y
# ifndef PROBE_PT_1_Y
# define PROBE_PT_1_Y MIN_ PROBE_Y
# define PROBE_PT_1_Y PROBE_Y_MIN
# endif
# endif
# ifndef PROBE_PT_2_X
# ifndef PROBE_PT_2_X
# define PROBE_PT_2_X MAX_ PROBE_X
# define PROBE_PT_2_X PROBE_X_MA X
# endif
# endif
# ifndef PROBE_PT_2_Y
# ifndef PROBE_PT_2_Y
# define PROBE_PT_2_Y MIN_ PROBE_Y
# define PROBE_PT_2_Y PROBE_Y_MIN
# endif
# endif
# ifndef PROBE_PT_3_X
# ifndef PROBE_PT_3_X
# define PROBE_PT_3_X X_CENTER
# define PROBE_PT_3_X X_CENTER
# endif
# endif
# ifndef PROBE_PT_3_Y
# ifndef PROBE_PT_3_Y
# define PROBE_PT_3_Y MAX_PROBE_Y
# define PROBE_PT_3_Y PROBE_Y_MAX
# endif
# endif
# endif
# if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
# ifndef LEFT_PROBE_BED_POSITION
# define LEFT_PROBE_BED_POSITION MIN_PROBE_X
# endif
# ifndef RIGHT_PROBE_BED_POSITION
# define RIGHT_PROBE_BED_POSITION MAX_PROBE_X
# endif
# ifndef FRONT_PROBE_BED_POSITION
# define FRONT_PROBE_BED_POSITION MIN_PROBE_Y
# endif
# endif
# ifndef BACK_PROBE_BED_POSITION
# define BACK_PROBE_BED_POSITION MAX_PROBE_Y
# endif
# endif
# endif
# endif