File tree 2 files changed +11
-7
lines changed
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change @@ -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
You can’t perform that action at this time.
0 commit comments