Explorar el Código

Fix G2/G3 segment size

Fixes #17348
Scott Lahteine hace 5 años
padre
commit
de6a725b04
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6
    1
      Marlin/src/gcode/motion/G2_G3.cpp

+ 6
- 1
Marlin/src/gcode/motion/G2_G3.cpp Ver fichero

112
   #else
112
   #else
113
     constexpr float seg_length = MM_PER_ARC_SEGMENT;
113
     constexpr float seg_length = MM_PER_ARC_SEGMENT;
114
   #endif
114
   #endif
115
+
116
+  // Length divided by segment size gives segment count
115
   uint16_t segments = FLOOR(mm_of_travel / seg_length);
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
    * Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector,
124
    * Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector,

Loading…
Cancelar
Guardar