From e02f5fae7c42b527a95a70641e88e1d753b054cf Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 26 Aug 2018 19:17:16 +0200 Subject: [PATCH] handle case if a B-spline is straight and thus maximum curvature is zero --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index db8c60a614..976d91c6f5 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -3728,14 +3728,12 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer } - double temprepscale = ( 0.5 * maxdisttocenterofmass ) / maxcurv; // just a factor to make a comb reasonably visible - - if( temprepscale > combrepscale ) + double temprepscale = 0; + if (maxcurv > 0) + temprepscale = (0.5 * maxdisttocenterofmass) / maxcurv; // just a factor to make a comb reasonably visible + + if (temprepscale > combrepscale) combrepscale = temprepscale; - - - } - else { } }