http://smoothieware.org/motion-control# ... -deviationJunction deviation determines how much to slow down, proportional to how much the direction changes.
Code: Select all
...
distance = sqrt(pow((x - oldx),2) + pow((y-oldy),2) + pow((z-oldz),2));
if (distance == 0.0){ oldf = f; return 0; }
if (!mm) distance = distance * 25.4;
xa = x - oldx; ya = y - oldy; za = z - oldz;
costheta = (xa*oldxa + ya*oldya + za+oldza) / ( sqrt(xa*xa + ya*ya + za*za) * sqrt(oldxa*oldxa + oldya*oldya + oldza*oldza) );
if (costheta < 0.95F) { //smoothieware constant 0.95 is limit where we assume line is "straight enough" and treat it that way without any slowdown
speed = f;
if (costheta > -0.95F) {
sin_theta_d2 = sqrt(0.5 * (1.0 - costheta));
speed = min(speed, sqrt(accel * jdev * sin_theta_d2 / (1.0 - sin_theta_d2)));
}
}
Ta = (f - oldspeed) / accel;
Td = (f - speed) / accel;
Sa = (f + oldspeed) * Ta / 2.0;
Sd = (f + speed) * Td / 2.0;
if ((Sa + Sd) < distance){
Ts = (distance - (Sa + Sd)) / f;
} else {
Ts = 0;
Ta = distance / (f + oldspeed);
Td = distance / (f + speed);
}
ret = Ta + Ts + Td;
...
a fairly slow arm box I use for some testing takes 0.049 seconds to calculate the total time smoothieware based firmware will take to execute a g-code for a 85320 lines G-code (2.3MB file) so I doubt you will notice any speed impact on your desktop for properly calculating time it takes to print something...tenaja wrote:How much slower will slicing be if they switch from a simple calculation to a complicated one?
Code: Select all
e:\Dev\eclipse-workspace\gcodestat\gs.bat "[output_filepath]"
Code: Select all
@echo off
e:\Dev\eclipse-workspace\gcodestat\gcodestat.exe -d 0.02 -a 1000 --gcode=%* | c:\Windows\System32\msg.exe %username%