Index: bus.c =================================================================== --- bus.c (revision 29956) +++ bus.c (revision 29957) @@ -175,7 +175,9 @@ bus_seg_calc(l); if (c1) { - a1 = M_PI - a1 - atan2(l->Point2.Y - l->Point1.Y, l->Point2.X - l->Point1.X); + double a0 = atan2(l->Point2.Y - l->Point1.Y, l->Point2.X - l->Point1.X); +pcb_trace("c1 a0=%f a1=%f\n", a0 * PCB_RAD_TO_DEG, a1 * PCB_RAD_TO_DEG); + a1 = M_PI - a1 - a0; a1 = -a1; tune1 = tan(a1/2.0); } @@ -183,7 +185,9 @@ tune1 = 0; if (c2) { - a2 = M_PI - a2 - atan2(l->Point1.Y - l->Point2.Y, l->Point1.X - l->Point2.X); + double a0 = atan2(l->Point1.Y - l->Point2.Y, l->Point1.X - l->Point2.X); +pcb_trace("c1 a0=%f a2=%f\n", a0 * PCB_RAD_TO_DEG, a2 * PCB_RAD_TO_DEG); + a2 = M_PI - a2 - a0; tune2 = tan(a2/2.0); } else @@ -192,6 +196,7 @@ pcb_trace("tune: %f:%f %f:%f\n", a1 * PCB_RAD_TO_DEG, tune1, a2 * PCB_RAD_TO_DEG, tune2); for(n = 0; n < bus->width; n++,o-=bus->pitch) { + pcb_trace(" off1: %f %f %ml = %ml\n", vx, tune1, (pcb_coord_t)o, (pcb_coord_t)(vx * tune1 * o)); pcb_trace(" off2: %f %f %ml = %ml\n", vx, tune2, (pcb_coord_t)o, (pcb_coord_t)(vx * tune2 * o)); tr = pcb_line_new(tly, l->Point1.X + nx * o + vx * tune1 * o, l->Point1.Y + ny * o + vy * tune1 * o,