Salome HOME
Avoid setting 0 as a value of B-spline weight (issue #3155)
authorazv <azv@opencascade.com>
Fri, 28 Feb 2020 08:16:15 +0000 (11:16 +0300)
committerazv <azv@opencascade.com>
Fri, 28 Feb 2020 08:16:15 +0000 (11:16 +0300)
src/PartSet/PartSet_BSplineWidget.cpp

index b2e0334c77a37041d4e3564e16e6b09e484daca3..b75504d7d0e322cb93274c9f2b82bf4e622506da 100644 (file)
@@ -105,7 +105,10 @@ void PartSet_BSplineWidget::storePolesAndWeights() const
 
   std::list<BSplinePoleWidgets>::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);
   }
 }