Add JD_HANDLE_SMALL_SEGMENTS option (#18316)
This commit is contained in:
parent
aea60d9450
commit
a4b46eaf8f
@ -815,6 +815,8 @@
|
||||
*/
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
#define JUNCTION_DEVIATION_MM 0.013 // (mm) Distance from real junction edge
|
||||
#define JD_HANDLE_SMALL_SEGMENTS // Use curvature estimation instead of just the junction angle
|
||||
// for small segments (< 1mm) with large junction angles (> 135°).
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -2352,6 +2352,8 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
|
||||
vmax_junction_sqr = junction_acceleration * junction_deviation_mm * sin_theta_d2 / (1.0f - sin_theta_d2);
|
||||
|
||||
#if ENABLED(JD_HANDLE_SMALL_SEGMENTS)
|
||||
|
||||
// For small moves with >135° junction (octagon) find speed for approximate arc
|
||||
if (block->millimeters < 1 && junction_cos_theta < -0.7071067812f) {
|
||||
|
||||
@ -2435,6 +2437,8 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
const float limit_sqr = (block->millimeters * junction_acceleration) / junction_theta;
|
||||
NOMORE(vmax_junction_sqr, limit_sqr);
|
||||
}
|
||||
|
||||
#endif // JD_HANDLE_SMALL_SEGMENTS
|
||||
}
|
||||
|
||||
// Get the lowest speed
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "../MarlinCore.h"
|
||||
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
#if ENABLED(JD_HANDLE_SMALL_SEGMENTS)
|
||||
// Enable this option for perfect accuracy but maximum
|
||||
// computation. Should be fine on ARM processors.
|
||||
//#define JD_USE_MATH_ACOS
|
||||
|
Loading…
Reference in New Issue
Block a user