Index: trunk/src/plugins/io_eeschema/read_render.c =================================================================== --- trunk/src/plugins/io_eeschema/read_render.c (revision 11409) +++ trunk/src/plugins/io_eeschema/read_render.c (revision 11410) @@ -293,6 +293,19 @@ return NULL; } + if(ctx->ver>=20250114) + { + float t; + + t = sx; + sx = ex; + ex = t; + + t = sy; + sy = ey; + ey = t; + } + dbg_printf("mkarc (%f;%f) (%f;%f) (%f;%f)\n", sx, sy, mx, my, ex, ey); if(fabs(sx-ex)<0.01 && fabs(sy-ey)<0.01) @@ -307,10 +320,10 @@ return NULL; } - dbg_printf(" solution: c=(%f;%f9, r=%f\n", cx, cy, r); + dbg_printf(" solution: c=(%f;%f), r=%f\n", cx, cy, r); - ang_start = -atan2(sy-cy, sx-cx) * 180.0 / M_PI; - ang_end = -atan2(ey-cy, ex-cx) * 180.0 / M_PI; + ang_start = atan2(cy-sy, sx-cx) * 180.0 / M_PI; + ang_end = atan2(cy-ey, ex-cx) * 180.0 / M_PI; if(ctx->cur_libsym) { @@ -320,12 +333,12 @@ ang_end += 180; } - if(ang_start<0) { ang_start += 360.0; } - if(ang_end<0) { ang_end += 360.0; } + dbg_printf(" angles: start=%f, end=%f\n", ang_start, ang_end); - ang_delta = ang_start - ang_end; + ang_delta = ang_end - ang_start; - if(ang_delta<0) { ang_delta += 360.0; } + if(ang_delta>0) { ang_delta -= 360.0; } + ang_delta = -ang_delta; if(!(arc=csch_alien_mkpoly(&ctx->alien, dst, stroke, fill))) { @@ -333,6 +346,8 @@ return NULL; } + dbg_printf(" delta: %f\n", ang_delta); + /* ang_end is actually the start angle, because the points are in CW */ /* order, but angles increasing in CCW order */ /* (split arc up to avoid special cases!) */