Closed nedlecky closed 2 years ago
This is now 2 Hz for blend_radius==0 BUT we recommend blend_radius==2mm and then we do a new point every 1.5 blend radii
Circles and spirals are done with imover_realtime off so the blend actually works!
def recommend_npoints(diam_m):
local circum_m = MATH_PI diam_m local t = circum_m / grind_speed_mps global grind_circle_n_sides = limiter(ceil(t 2), 2, 1000) return grind_circle_n_sides end
def grind_circle(circle_diam_mm, n_cycles, stay_in_contact): global grind_circle_n_sides = recommend_npoints(circle_diam_mm / 1000.0)
if grind_blend_radius_m > 0.0:
local circum_m = MATH_PI * circle_diam_mm / 1000.
global grind_circle_n_sides = ceil(circum_m / (grind_blend_radius_m * 1.5))
end ...
Are we calculating correctly?
Another way to look at it is 2 points per second, like we do in grind_movel.
This would be pi D / speed 2.
100mm diam circle is 314mm circumference. So at 20mm/s you'd want 15 points but we insist on 100 so we don't polygon. But at 2mm/s you'd want 157 and you'd want 314 points at 1mm/s