TPARA - 3DOF robot arm IK (#21005)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
@ -395,8 +395,21 @@ FORCE_INLINE bool all_axes_trusted() { return xyz_bits ==
|
||||
// Return true if the given point is within the printable area
|
||||
inline bool position_is_reachable(const float &rx, const float &ry, const float inset=0) {
|
||||
#if ENABLED(DELTA)
|
||||
|
||||
return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS - inset + fslop);
|
||||
|
||||
#elif ENABLED(AXEL_TPARA)
|
||||
|
||||
const float R2 = HYPOT2(rx - TPARA_OFFSET_X, ry - TPARA_OFFSET_Y);
|
||||
return (
|
||||
R2 <= sq(L1 + L2) - inset
|
||||
#if MIDDLE_DEAD_ZONE_R > 0
|
||||
&& R2 >= sq(float(MIDDLE_DEAD_ZONE_R))
|
||||
#endif
|
||||
);
|
||||
|
||||
#elif IS_SCARA
|
||||
|
||||
const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
|
||||
return (
|
||||
R2 <= sq(L1 + L2) - inset
|
||||
@ -404,6 +417,7 @@ FORCE_INLINE bool all_axes_trusted() { return xyz_bits ==
|
||||
&& R2 >= sq(float(MIDDLE_DEAD_ZONE_R))
|
||||
#endif
|
||||
);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user