Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Reworked detection of collision with printbed. The detection uses now different algorithms in dependence of the printbed type (rectangular, circular, convex) to improve performance.

This commit is contained in:
enricoturri1966 2021-10-06 13:47:54 +02:00
parent 982172b878
commit 4ff13a5d63
10 changed files with 209 additions and 74 deletions

View file

@ -139,6 +139,7 @@ public:
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
static bool is_rectangle(const Pointfs& shape, Vec2d* min = nullptr, Vec2d* max = nullptr);
static bool is_circle(const Pointfs& shape, Vec2d* center = nullptr, double* radius = nullptr);
static bool is_convex(const Pointfs& shape);
static EShapeType detect_shape_type(const Pointfs& shape);
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS