1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-22 23:26:27 +02:00

gp2rml: properly calculate pen down time

This commit is contained in:
Werner Almesberger 2012-03-21 01:15:05 -03:00
parent 3e7fca45b3
commit 6c3bc3e58e

View File

@ -144,9 +144,11 @@ static void output_paths(double z_clear, double xy_speed, double z_speed)
printf("!PZ%d,%d;PA%d,%d;PD\n",
units(seg->z-z_max), units(z_clear),
units(seg->x), units(seg->y));
d = hypot(x-seg->x, y-seg->y)+(z-z_max);
d = hypot(x-seg->x, y-seg->y);
s += d;
s += z-z_max;
t += d/V_MAX;
t += (z-z_max)/z_speed;
x = seg->x;
y = seg->y;
z = seg->z;