ソースを参照

Arc segment radius scaling (#16551)

Ryan 4年前
コミット
b7f86bffd5
2個のファイルの変更11行の追加7行の削除
  1. 7
    6
      Marlin/Configuration_adv.h
  2. 4
    1
      Marlin/src/gcode/motion/G2_G3.cpp

+ 7
- 6
Marlin/Configuration_adv.h ファイルの表示

@@ -1567,14 +1567,15 @@
1567 1567
 //
1568 1568
 // G2/G3 Arc Support
1569 1569
 //
1570
-#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
1570
+#define ARC_SUPPORT                 // Disable this feature to save ~3226 bytes
1571 1571
 #if ENABLED(ARC_SUPPORT)
1572
-  #define MM_PER_ARC_SEGMENT    1 // (mm) Length (or minimum length) of each arc segment
1573
-  #define MIN_ARC_SEGMENTS     24 // Minimum number of segments in a complete circle
1572
+  #define MM_PER_ARC_SEGMENT      1 // (mm) Length (or minimum length) of each arc segment
1573
+  //#define ARC_SEGMENTS_PER_R    1 // Max segment length, MM_PER = Min
1574
+  #define MIN_ARC_SEGMENTS       24 // Minimum number of segments in a complete circle
1574 1575
   //#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum)
1575
-  #define N_ARC_CORRECTION     25 // Number of interpolated segments between corrections
1576
-  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
1577
-  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
1576
+  #define N_ARC_CORRECTION       25 // Number of interpolated segments between corrections
1577
+  //#define ARC_P_CIRCLES           // Enable the 'P' parameter to specify complete circles
1578
+  //#define CNC_WORKSPACE_PLANES    // Allow G2/G3 to operate in XY, ZX, or YZ planes
1578 1579
 #endif
1579 1580
 
1580 1581
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.

+ 4
- 1
Marlin/src/gcode/motion/G2_G3.cpp ファイルの表示

@@ -105,7 +105,10 @@ void plan_arc(
105 105
 
106 106
   const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s);
107 107
 
108
-  #ifdef ARC_SEGMENTS_PER_SEC
108
+  #ifdef ARC_SEGMENTS_PER_R
109
+    float seg_length = MM_PER_ARC_SEGMENT * radius;
110
+    LIMIT(seg_length, MM_PER_ARC_SEGMENT, ARC_SEGMENTS_PER_R);
111
+  #elif ARC_SEGMENTS_PER_SEC
109 112
     float seg_length = scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC);
110 113
     NOLESS(seg_length, MM_PER_ARC_SEGMENT);
111 114
   #else

読み込み中…
キャンセル
保存