]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Update method improved.
authoradv <adv@opencascade.com>
Mon, 2 Dec 2013 11:27:15 +0000 (11:27 +0000)
committeradv <adv@opencascade.com>
Mon, 2 Dec 2013 11:27:15 +0000 (11:27 +0000)
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Object.h
src/HYDROData/HYDROData_Polyline3D.cxx
src/HYDROData/HYDROData_Stream.cxx

index 45ea5f015ea173face131c15bbdceae15dd27247..f8c514b3a86f9a7690bb0896154d0347e0ebe6f9 100644 (file)
@@ -34,6 +34,13 @@ void HYDROData_Object::SetShape3D( const TopoDS_Shape& theShape )
   aBuilder.Generated( theShape );
 }
 
+void HYDROData_Object::Update()
+{
+  removeTopShape();
+  removeShape3D();
+  SetToUpdate( false );
+}
+
 void HYDROData_Object::SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
 {
   SetReferenceObject( theBathymetry, DataTag_Bathymetry );
index eda7375543c9f4c098c1bf7606cc6a77183d71e3..0fcd138480fb330c2a545fc40b2b0465bc273732 100644 (file)
@@ -54,6 +54,13 @@ public:
   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const = 0;
 
   
+  /**
+   * Update the geometry object.
+   * Call this method whenever you made changes for object data.
+   */
+  HYDRODATA_EXPORT virtual void Update();
+
+
   /**
    * Set reference bathymetry object for geometry object.
    */
index bb8d172bd6e1795facd17067f78dbe36195dc63a..89f3be36c6299af77a9da7d67116c378df7be401 100644 (file)
@@ -62,8 +62,7 @@ TopoDS_Shape HYDROData_Polyline3D::GetShape3D() const
 
 void HYDROData_Polyline3D::Update()
 {
-  removeTopShape();
-  removeShape3D();
+  HYDROData_Object::Update();
 
   Handle(HYDROData_PolylineXY) aPolylineXY = GetPolylineXY();
   Handle(HYDROData_ProfileUZ) aProfileUZ = GetProfileUZ();
index 0512e90a24474f6bc725a619338f792daac1ab70..19c9900abfbbaa0302b98c833ccf8b73a28ec008 100644 (file)
@@ -66,8 +66,7 @@ TopoDS_Shape HYDROData_Stream::GetShape3D() const
 
 void HYDROData_Stream::Update()
 {
-  removeTopShape();
-  removeShape3D();
+  HYDROData_NaturalObject::Update();
 
   Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
   HYDROData_SequenceOfObjects aRefProfiles = GetProfiles();