Salome HOME
17.12.2013. Added Partition algorithm (draft version).
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_Curve.cxx
index 0c6c45be4b9bb85032d42816ef96cd575d0aabac..a4f9947cfb14327c7a7d95d8f730329b0f65f5df 100644 (file)
@@ -51,7 +51,8 @@ CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimensi
   myNbUndos   (0),
   myNbRedos   (0),
   myUndoDepth (-1),
-  myOpLevel(0)
+  myOpLevel(0),
+  mySkipSorting(false)
 {
 }
 
@@ -540,6 +541,30 @@ int CurveCreator_Curve::getNbPoints( const int theISection ) const
   return aNbCoords/myDimension;
 }
 
+void CurveCreator_Curve::setSkipSorting( const bool theIsToSkip )
+{
+  mySkipSorting = theIsToSkip;
+}
+
+bool CurveCreator_Curve::canPointsBeSorted()
+{
+  return false;
+}
+
+/**
+ * Saves points coordinates difference.
+ * \param theOldCoords the old points coordinates
+ */
+void CurveCreator_Curve::saveCoordDiff( const SectionToPointCoordsList &theOldCoords )
+{
+  // Set the difference.
+  startOperation();
+  if (addEmptyDiff()) {
+    myListDiffs.back().init(this, theOldCoords);
+  }
+  finishOperation();
+}
+
 //! Get "closed" flag of the specified section
 bool CurveCreator_Curve::isClosed( const int theISection ) const
 {
@@ -795,12 +820,13 @@ bool CurveCreator_Curve::setPoint( const int theISection,
 }
 
 //! Set coordinates of specified points from different sections
-bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords)
+bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords,
+                                           const bool theIsToSaveDiff )
 {
   bool res = false;
   // Set the difference.
   startOperation();
-  if (addEmptyDiff()) {
+  if (theIsToSaveDiff && addEmptyDiff()) {
     myListDiffs.back().init(this, CurveCreator_Operation::SetCoordinates,
                             theSectionToPntCoords);
   }