|
|
@ -291,6 +291,7 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#if IS_KINEMATIC // (DELTA or SCARA)
|
|
|
|
#if IS_KINEMATIC // (DELTA or SCARA)
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_SCARA_OFFSET
|
|
|
|
#if HAS_SCARA_OFFSET
|
|
|
|
extern abc_pos_t scara_home_offset; // A and B angular offsets, Z mm offset
|
|
|
|
extern abc_pos_t scara_home_offset; // A and B angular offsets, Z mm offset
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -315,14 +316,26 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_PROBE_XY_OFFSET
|
|
|
|
|
|
|
|
|
|
|
|
// Return true if the both nozzle and the probe can reach the given point.
|
|
|
|
// Return true if the both nozzle and the probe can reach the given point.
|
|
|
|
// Note: This won't work on SCARA since the probe offset rotates with the arm.
|
|
|
|
// Note: This won't work on SCARA since the probe offset rotates with the arm.
|
|
|
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
return position_is_reachable(rx - probe_offset.x, ry - probe_offset.y)
|
|
|
|
return position_is_reachable(rx - probe_offset.x, ry - probe_offset.y)
|
|
|
|
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
|
|
|
|
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FORCE_INLINE bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
|
|
|
|
return position_is_reachable(rx, ry, MIN_PROBE_EDGE);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // HAS_BED_PROBE
|
|
|
|
|
|
|
|
|
|
|
|
#else // CARTESIAN
|
|
|
|
#else // CARTESIAN
|
|
|
|
|
|
|
|
|
|
|
|
// Return true if the given position is within the machine bounds.
|
|
|
|
// Return true if the given position is within the machine bounds.
|
|
|
@ -340,6 +353,7 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
inline bool position_is_reachable(const xy_pos_t &pos) { return position_is_reachable(pos.x, pos.y); }
|
|
|
|
inline bool position_is_reachable(const xy_pos_t &pos) { return position_is_reachable(pos.x, pos.y); }
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return whether the given position is within the bed, and whether the nozzle
|
|
|
|
* Return whether the given position is within the bed, and whether the nozzle
|
|
|
|
* can reach the position required to put the probe at the given position.
|
|
|
|
* can reach the position required to put the probe at the given position.
|
|
|
@ -348,11 +362,12 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
* nozzle must be be able to reach +10,-10.
|
|
|
|
* nozzle must be be able to reach +10,-10.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
return position_is_reachable(rx - probe_offset.x, ry - probe_offset.y)
|
|
|
|
return position_is_reachable(rx - probe_offset_xy.x, ry - probe_offset_xy.y)
|
|
|
|
&& WITHIN(rx, probe_min_x() - slop, probe_max_x() + slop)
|
|
|
|
&& WITHIN(rx, probe_min_x() - slop, probe_max_x() + slop)
|
|
|
|
&& WITHIN(ry, probe_min_y() - slop, probe_max_y() + slop);
|
|
|
|
&& WITHIN(ry, probe_min_y() - slop, probe_max_y() + slop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif // HAS_BED_PROBE
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CARTESIAN
|
|
|
|
#endif // CARTESIAN
|
|
|
|
|
|
|
|
|
|
|
|