1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 21:36:21 +00:00

Fix G2/G3 segment size

Fixes #17348
This commit is contained in:
Scott Lahteine 2020-05-10 02:46:37 -05:00
parent ba9a9bbe58
commit de6a725b04

View File

@ -112,8 +112,13 @@ void plan_arc(
#else #else
constexpr float seg_length = MM_PER_ARC_SEGMENT; constexpr float seg_length = MM_PER_ARC_SEGMENT;
#endif #endif
// Length divided by segment size gives segment count
uint16_t segments = FLOOR(mm_of_travel / seg_length); uint16_t segments = FLOOR(mm_of_travel / seg_length);
NOLESS(segments, min_segments); if (segments < min_segments) {
segments = min_segments; // No fewer than the minimum
seg_length = mm_of_travel / segments; // A new segment length
}
/** /**
* Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, * Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector,