Browse Source

Fix G2/G3 segment size

Fixes #17348
Scott Lahteine 5 years ago
parent
commit
de6a725b04
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      Marlin/src/gcode/motion/G2_G3.cpp

+ 6
- 1
Marlin/src/gcode/motion/G2_G3.cpp View File

@@ -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,

Loading…
Cancel
Save