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