From 7124ed7b78f41b15cfd66f4779a379e58b3dddd2 Mon Sep 17 00:00:00 2001 From: rocifier Date: Sun, 17 Mar 2019 00:51:56 +1300 Subject: arc polygonization uses arc's scale for precision --- src/livarot/PathConversion.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/livarot/PathConversion.cpp') diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp index dfea8755d..737ecbeeb 100644 --- a/src/livarot/PathConversion.cpp +++ b/src/livarot/PathConversion.cpp @@ -825,9 +825,10 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE, Geom::Scale const ar(rx, ry); Geom::Rotate cb(sang); Geom::Rotate cbangle(angle*M_PI/180.0); + if (wise) { - double const incr = -0.1; + double const incr = -0.1/sqrt(ar.vector().length()); if ( sang < eang ) { sang += 2*M_PI; } @@ -839,7 +840,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE, } else { - double const incr = 0.1; + double const incr = 0.1/sqrt(ar.vector().length()); if ( sang > eang ) { sang -= 2*M_PI; } @@ -969,9 +970,9 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE, Geom::Scale const ar(rx, ry); Geom::Rotate cb(sang); Geom::Rotate cbangle(angle*M_PI/180.0); - if (wise) { - double const incr = -0.1; + if (wise) { + double const incr = -0.1/sqrt(ar.vector().length()); if ( sang < eang ) { sang += 2*M_PI; } @@ -983,7 +984,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE, } else { - double const incr = 0.1; + double const incr = 0.1/sqrt(ar.vector().length()); if ( sang > eang ) { sang -= 2 * M_PI; } @@ -1090,7 +1091,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE, Geom::Rotate cbangle(angle*M_PI/180.0); if (wise) { - double const incr = -0.1; + double const incr = -0.1/sqrt(ar.vector().length()); if ( sang < eang ) { sang += 2*M_PI; } @@ -1101,7 +1102,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE, } } else { - double const incr = 0.1; + double const incr = 0.1/sqrt(ar.vector().length()); if ( sang > eang ) { sang -= 2*M_PI; } -- cgit v1.2.3