Index: thermal.c =================================================================== --- thermal.c (revision 12417) +++ thermal.c (revision 12418) @@ -174,10 +174,64 @@ x2 + clrth * nx - clr * vx * 2.0, y2 + clrth * ny - clr * vy * 2.0, clr, 180.0); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); + } + else { /* non-diagonal */ + /* split side lines */ + pa = pa_line_at( + x1 - clrth * nx - clr * vx * 0.00, y1 - clrth * ny - clr * vy * 0.00, + mx - clrth * nx + clr * vx * 1.00, my - clrth * ny + clr * vy * 1.00, + clr); + pb = pa_line_at( + x1 + clrth * nx - clr * vx * 0.00, y1 + clrth * ny - clr * vy * 0.00, + mx + clrth * nx + clr * vx * 1.00, my + clrth * ny + clr * vy * 1.00, + clr); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); - return pc; + pa = pc; pc = NULL; + pb = pa_line_at( + mx - clrth * nx - clr * vx * 1.00, my - clrth * ny - clr * vy * 1.00, + x2 - clrth * nx + clr * vx * 0.00, y2 - clrth * ny + clr * vy * 0.00, + clr); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); + + pa = pc; pc = NULL; + pb = pa_line_at( + mx + clrth * nx - clr * vx * 1.00, my + clrth * ny - clr * vy * 1.00, + x2 + clrth * nx + clr * vx * 0.00, y2 + clrth * ny + clr * vy * 0.00, + clr); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); + + /* split round cap, x1;y1 */ + pa = pc; pc = NULL; + pb = pa_arc_at(x1, y1, clrth, + x1 - clrth * nx, y1 - clrth * ny, + x1 + clrth * vx - clr * nx, y1 + clrth * vy - clr * ny, + clr, 180.0); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); + + pa = pc; pc = NULL; + pb = pa_arc_at(x1, y1, clrth, + x1 + clrth * nx, y1 + clrth * ny, + x1 + clrth * vx + clr * nx, y1 + clrth * vy + clr * ny, + clr, 180.0); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); + + /* split round cap, x2;y2 */ + pa = pc; pc = NULL; + pb = pa_arc_at(x2, y2, clrth, + x2 - clrth * nx, y2 - clrth * ny, + x2 - clrth * vx - clr * nx, y2 - clrth * vy - clr * ny, + clr, 180.0); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); + + pa = pc; pc = NULL; + pb = pa_arc_at(x2, y2, clrth, + x2 + clrth * nx, y2 + clrth * ny, + x2 - clrth * vx + clr * nx, y2 - clrth * vy + clr * ny, + clr, 180.0); + pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); } - + return pc; case PCB_THERMAL_SHARP: break; }