From c3ced8096db500874adff64150520c4bb69bd5eb Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Thu, 31 Oct 2013 15:55:53 -0400 Subject: conversions from radians to degrees for arcs (Bug 324117) Fixed bugs: - https://launchpad.net/bugs/324117 (bzr r12756) --- src/livarot/PathCutting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/livarot/PathCutting.cpp') diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp index 3ce907bf3..1ebac7644 100644 --- a/src/livarot/PathCutting.cpp +++ b/src/livarot/PathCutting.cpp @@ -303,7 +303,7 @@ Path::MakePathVector() { /* TODO: add testcase for this descr_arcto case */ PathDescrArcTo *nData = dynamic_cast(descr_cmd[i]); - currentpath->appendNew( nData->rx, nData->ry, nData->angle, nData->large, !nData->clockwise, nData->p ); + currentpath->appendNew( nData->rx, nData->ry, nData->angle*M_PI/180.0, nData->large, !nData->clockwise, nData->p ); lastP = nData->p; } break; @@ -398,7 +398,7 @@ void Path::AddCurve(Geom::Curve const &c) else if(Geom::SVGEllipticalArc const *svg_elliptical_arc = dynamic_cast(&c)) { ArcTo( svg_elliptical_arc->finalPoint(), svg_elliptical_arc->ray(Geom::X), svg_elliptical_arc->ray(Geom::Y), - svg_elliptical_arc->rotationAngle(), /// \todo check that this parameter is in radians (rotation_angle returns the angle in radians!) + svg_elliptical_arc->rotationAngle()*180.0/M_PI, // convert from radians to degrees svg_elliptical_arc->largeArc(), !svg_elliptical_arc->sweep() ); } else { //this case handles sbasis as well as all other curve types -- cgit v1.2.3 From 90bb2311a8e87439c8ae845fcf22755e40030d1d Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Sat, 2 Nov 2013 09:04:00 -0400 Subject: more conversions from radians to degrees for arcs (Bug 1239462) Fixed bugs: - https://launchpad.net/bugs/1239462 (bzr r12763) --- src/livarot/PathCutting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/livarot/PathCutting.cpp') diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp index 1ebac7644..201f64b54 100644 --- a/src/livarot/PathCutting.cpp +++ b/src/livarot/PathCutting.cpp @@ -1217,7 +1217,7 @@ void Path::ConvertPositionsToForced(int nbPos, cut_position *poss) } { double sang,eang; - ArcAngles(startP,endP,rx,ry,angle,large,clockw,sang,eang); + ArcAngles(startP,endP,rx,ry,angle*M_PI/180.0,large,clockw,sang,eang); if (clockw) { if ( sang < eang ) sang += 2*M_PI; -- cgit v1.2.3