From 968f01e206a9f37b3705ee13514df42f2cac92da Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sun, 23 Apr 2017 05:46:20 +0200 Subject: [PATCH] Sketcher: Force solver to return non-driving angles in [-pi,pi] --- src/Mod/Sketcher/App/Sketch.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 4089f959ce..6531f661f5 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -35,7 +35,6 @@ #include #include #include - #include #include @@ -2742,8 +2741,13 @@ bool Sketch::updateNonDrivingConstraints() (*it).constr->Value = n2/n1; } - else + else if((*it).constr->Type==Angle) { + + (*it).constr->Value = std::fmod(*((*it).value), M_PI); + } + else { (*it).constr->Value=*((*it).value); + } } } return true;