]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Add a new functions: 'removeSeveralPoints' and 'setSeveralPoints' to remove or move...
authorakl <akl@opencascade.com>
Wed, 20 Nov 2013 11:13:41 +0000 (11:13 +0000)
committerakl <akl@opencascade.com>
Wed, 20 Nov 2013 11:13:41 +0000 (11:13 +0000)
 points at once.

src/HYDROCurveCreator/CurveCreator_Curve.cxx
src/HYDROCurveCreator/CurveCreator_Curve.hxx
src/HYDROCurveCreator/CurveCreator_ICurve.hxx
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_PolylineXY.h
src/HYDROData/HYDROData_ProfileUZ.cxx
src/HYDROData/HYDROData_ProfileUZ.h

index f27cfb2ef807efd86750ec8da738cab674fd5be5..f056b03426ae1b2c486c6de592bacf4d73193df8 100644 (file)
@@ -860,6 +860,12 @@ bool CurveCreator_Curve::setPoint( const int theISection,
   return res; 
 }
 
+//! Set coordinates of specified points from different sections
+bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords)
+{
+  return false;
+}
+
 //! For internal use only! Undo/Redo are not used here.
 bool CurveCreator_Curve::removePointsInternal( const std::vector<int> &theISections, 
                                                const std::vector<int> &theIPnts )
@@ -904,7 +910,13 @@ bool CurveCreator_Curve::removePoint( const int theISection, const int theIPnt )
   return res;
 }
 
-//=======================================================================
+//! Remove several points from different sections with given ids
+bool CurveCreator_Curve::removeSeveralPoints( const SectionToPointList &theSectionToPntIDs)
+{
+  return false;
+}
+
+  //=======================================================================
 // function: getCoordinates
 // purpose:
 //=======================================================================
index f9e415884ca273883a370f966a5f7822b03eeea3..bb29e889e439f8630ca3a273c7cc4e3c5d2e6c2a 100644 (file)
@@ -232,12 +232,18 @@ public:
                          const int theIPnt,
                          const CurveCreator::Coordinates& theNewCoords );
 
+  //! Set coordinates of specified points from different sections
+  virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords);
+
   //! For internal use only! Undo/Redo are not used here.
   virtual bool removePointsInternal( const std::vector<int> &theISections, 
                                      const std::vector<int> &theIPnts );
   /** Remove point with given id */
   virtual bool removePoint( const int theISection, const int theIPnt = -1 );
 
+  //! Remove several points from different sections with given ids
+  virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs);
+
   //! Get coordinates of specified point
   virtual CurveCreator::Coordinates getPoint( const int theISection, 
                                               const int theIPnt ) const;
index fd5e63d5b5e5518d999bc69487208ce82ebbba55..a36ebe92a8d4b34166d166a5bf01667d31d974e3 100644 (file)
@@ -59,6 +59,11 @@ class CURVECREATOR_EXPORT CurveCreator_ICurve
 public:
   typedef std::vector<Handle_AIS_InteractiveObject> ListAISObjects;
 
+  typedef std::pair<int,int> SectionToPoint;
+  typedef std::deque<SectionToPoint> SectionToPointList;
+
+  typedef std::deque<std::pair<SectionToPoint,std::deque<float>>> SectionToPointCoordsList;
+
 public:
   /***********************************************/
   /***          Undo/Redo methods              ***/
@@ -146,9 +151,14 @@ public:
   virtual bool setPoint( const int theISection,
                          const int theIPnt,
                          const std::deque<float>& theNewCoords ) = 0;
+  
+  //! Set coordinates of specified points from different sections
+  virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords) = 0;
 
   //! Remove point with given id
   virtual bool removePoint( const int theISection, const int theIPnt = -1 ) = 0;
+  //! Remove several points from different sections
+  virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs) = 0;
 
   //! Get coordinates of specified point
   virtual std::deque<float> getPoint( const int theISection, 
index d2f997940f6daa4b80ab18c93b261f8ea543f6b2..b97af6d579818a26694cc0dd3ce1e6823217f6fd 100755 (executable)
@@ -575,6 +575,12 @@ bool HYDROData_PolylineXY::setPoint( const int                        theISectio
   return true;
 }
 
+//! Set coordinates of specified points from different sections
+bool HYDROData_PolylineXY::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords)
+{
+  return false;
+}
+
 bool HYDROData_PolylineXY::removePoint( const int theISection,
                                         const int theIPnt )
 {
@@ -621,6 +627,12 @@ bool HYDROData_PolylineXY::removePoint( const int theISection,
   return true;
 }
 
+//! Remove several points from different sections with given ids
+bool HYDROData_PolylineXY::removeSeveralPoints( const SectionToPointList &theSectionToPntIDs)
+{
+  return false;
+}
+
 CurveCreator::Coordinates HYDROData_PolylineXY::getPoints( const int theISection ) const
 {
   CurveCreator::Coordinates aResList;
index 93caac614c465601c04a7be55e7988d16633d6a1..943f4d8ff160647ad975074babba9b09ae6fc3d6 100644 (file)
@@ -112,9 +112,15 @@ public:
                                           const int                        theIPnt,
                                           const CurveCreator::Coordinates& theCoords );
 
+  //! Set coordinates of specified points from different sections
+  HYDRODATA_EXPORT virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords);
+
   //! Remove point with given id
   HYDRODATA_EXPORT virtual bool removePoint( const int theISection, const int theIPnt = -1 );
 
+  //! Remove several points from different sections with given ids
+  HYDRODATA_EXPORT virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs);
+
   /**
    * Get points of a section (the total points in Curve if theISection is equal to -1)..
    */
index 98abdc8202afbb6aa3d17bac552f77978d7c7be6..014288dc4b0140e151155222af403a5f43e5d2df 100755 (executable)
@@ -233,6 +233,12 @@ bool HYDROData_ProfileUZ::removePoint( const int /*theISection*/,
   return true;
 }
 
+//! Remove several points from different sections with given ids
+bool HYDROData_ProfileUZ::removeSeveralPoints( const SectionToPointList &theSectionToPntIDs)
+{
+  return false;
+}
+
 bool HYDROData_ProfileUZ::setPoint( const int                        /*theISection*/,
                                     const int                        theIPoint,
                                     const CurveCreator::Coordinates& theNewCoords )
@@ -253,6 +259,12 @@ bool HYDROData_ProfileUZ::setPoint( const int                        /*theISecti
   return aRes;
 }
 
+//! Set coordinates of specified points from different sections
+bool HYDROData_ProfileUZ::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords)
+{
+  return false;
+}
+
 CurveCreator::Coordinates HYDROData_ProfileUZ::getPoints( const int /*theISection*/ ) const
 {
   CurveCreator::Coordinates aResList;
index fbb7eb0a9acbc511726fac5f9c718fefc84e6aa8..608b695311c6f64505ad5d68e10eaf8cb41fe2b4 100644 (file)
@@ -112,9 +112,15 @@ public:
                                           const int                        theIPnt,
                                           const CurveCreator::Coordinates& theCoords );
 
+  //! Set coordinates of specified points from different sections
+  HYDRODATA_EXPORT virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords);
+
   //! Remove point with given id
   HYDRODATA_EXPORT virtual bool removePoint( const int theISection, const int theIPnt = -1 );
 
+  //! Remove several points from different sections with given ids
+  HYDRODATA_EXPORT virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs);
+
   /**
    * Get points of a section (the total points in Curve if theISection is equal to -1)..
    */