From: azv Date: Fri, 28 Feb 2020 08:16:15 +0000 (+0300) Subject: Avoid setting 0 as a value of B-spline weight (issue #3155) X-Git-Tag: V9_5_0a2~78 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9d77b6b4c2fe3258bc4c4496ea172845d499b1fc;p=modules%2Fshaper.git Avoid setting 0 as a value of B-spline weight (issue #3155) --- diff --git a/src/PartSet/PartSet_BSplineWidget.cpp b/src/PartSet/PartSet_BSplineWidget.cpp index b2e0334c7..b75504d7d 100644 --- a/src/PartSet/PartSet_BSplineWidget.cpp +++ b/src/PartSet/PartSet_BSplineWidget.cpp @@ -105,7 +105,10 @@ void PartSet_BSplineWidget::storePolesAndWeights() const std::list::const_iterator anIt = myPoles.begin(); for (int anIndex = 0; anIt != myPoles.end(); ++anIndex, ++anIt) { - aWeightsArray->setValue(anIndex, anIt->myWeight->value()); + double aWeight = anIt->myWeight->value(); + if (aWeight < THE_MIN_WEIGHT) + aWeight = THE_MIN_WEIGHT; + aWeightsArray->setValue(anIndex, aWeight); } }