Salome HOME
Separate action "Find bottom" for context menu.
[modules/hydro.git] / src / HYDROData / HYDROData_Polyline3D.h
index f6e883b80d2ccf52d84712df165bb828f61c6514..1975afaff26a0dfd559f3e19c4dea2d563c1ab40 100644 (file)
@@ -1,3 +1,24 @@
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef HYDROData_Polyline3D_HeaderFile
 #define HYDROData_Polyline3D_HeaderFile
@@ -30,6 +51,7 @@ protected:
     DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
     DataTag_PolylineXY,          ///< reference hydraulic axis
     DataTag_ProfileUZ,           ///< reference profile
+    DataTag_ChildProfileUZ,      ///< reference profile
   };
 
 public:
@@ -83,7 +105,8 @@ public:
   /**
    * Sets reference x,y polyline object for 3D polyline.
    */
-  HYDRODATA_EXPORT virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline );
+  HYDRODATA_EXPORT virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline,
+                                               const bool                          theIsUpdateProfile = true );
 
   /**
    * Returns reference x,y polyline object of 3D polyline.
@@ -116,7 +139,24 @@ public:
    * Set reference bathymetry object for geometry object.
    * Reimplemented to remove reference u,z profile.
    */
-  HYDRODATA_EXPORT virtual bool SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
+  HYDRODATA_EXPORT virtual bool SetAltitudeObject( const Handle(HYDROData_IAltitudeObject)& theAltitude );
+
+  /**
+   * Clear the reference bathymetry object for geometry object.
+   * Reimplemented to remove child u,z profile.
+   */
+  HYDRODATA_EXPORT virtual void RemoveAltitudeObject();
+
+
+  /**
+   * Returns the child u,z profile which has been generated from bathymetry.
+   */
+  HYDRODATA_EXPORT Handle(HYDROData_ProfileUZ) GetChildProfileUZ( const bool theIsCreate = true ) const;
+
+  /**
+   * Sets the child u,z profile for polyline.
+   */
+  HYDRODATA_EXPORT void SetChildProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile );
 
 
 protected:
@@ -138,6 +178,14 @@ protected:
   HYDRODATA_EXPORT virtual void checkAndSetObject3D() {}
 
 
+protected:
+
+
+  void updateChildProfilePoints();
+
+  void removeChildProfileUZ();
+
+
 protected:
 
   friend class HYDROData_Iterator;