From 9d77b6b4c2fe3258bc4c4496ea172845d499b1fc Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 28 Feb 2020 11:16:15 +0300 Subject: [PATCH] Avoid setting 0 as a value of B-spline weight (issue #3155) --- src/PartSet/PartSet_BSplineWidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } } -- 2.39.2