Salome HOME
refs #1331: disabling automatic sorting of points in the GUI table
[modules/geom.git] / src / CurveCreator / CurveCreator_Section.cxx
index e2298c092acbcb95fb860e13ec9018fb9451482c..2b9beda578e425f79c1af0f5c09ace3732531b2f 100644 (file)
@@ -30,9 +30,10 @@ const double POINT_CONFUSION = 1e-4;
 // function: GetDifferentPoints
 // purpose:
 //=======================================================================
-void CurveCreator_Section::GetDifferentPoints(
-  const int theDimension, Handle(TColgp_HArray1OfPnt)& thePoints) const
+Handle(TColgp_HArray1OfPnt) CurveCreator_Section::GetDifferentPoints( int theDimension ) const
 {
+  Handle(TColgp_HArray1OfPnt) points;
+
   std::vector<gp_Pnt> aTmpPoints;
   CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin();
   CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end();
@@ -62,9 +63,11 @@ void CurveCreator_Section::GetDifferentPoints(
     }
   }
 
-  thePoints = new TColgp_HArray1OfPnt(1, aPointCount);
+  points = new TColgp_HArray1OfPnt(1, aPointCount);
   for (int aPI = 0; aPI < aPointCount; ++aPI)
   {
-    thePoints->SetValue(aPI + 1, aTmpPoints[aPI]);
+    points->SetValue(aPI + 1, aTmpPoints[aPI]);
   }
+
+  return points;
 }