Salome HOME
refs #636: flags for geometry 2d/3d change
[modules/hydro.git] / src / HYDROData / HYDROData_Channel.cxx
index a2bb6f47f942b7eff54e58cfebe2fd0067187877..6099dba698c20b1b73b0df19c3b3d8a922e2fc0f 100644 (file)
@@ -27,6 +27,7 @@
 #include "HYDROData_ShapesTool.h"
 #include "HYDROData_Pipes.h"
 #include "HYDROData_Stream.h"
+#include "HYDROData_Tool.h"
 
 #include <BRepBuilderAPI_MakeWire.hxx>
 
@@ -392,7 +393,7 @@ bool HYDROData_Channel::SetGuideLine( const Handle(HYDROData_Polyline3D)& theGui
   SetReferenceObject( theGuideLine, DataTag_GuideLine );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  SetToUpdate( true, true );
 
   return true;
 }
@@ -412,7 +413,7 @@ void HYDROData_Channel::RemoveGuideLine()
   ClearReferenceObjects( DataTag_GuideLine );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  SetToUpdate( true, true );
 }
 
 bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile )
@@ -431,7 +432,7 @@ bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile
   SetReferenceObject( theProfile, DataTag_Profile );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  SetToUpdate( true, true );
 
   return true;
 }
@@ -451,11 +452,22 @@ void HYDROData_Channel::RemoveProfile()
   ClearReferenceObjects( DataTag_Profile );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  SetToUpdate( true, true );
 }
 
 ObjectKind HYDROData_Channel::getAltitudeObjectType() const
 {
-  return KIND_OBSTACLE_ALTITUDE;
+  return KIND_STREAM_ALTITUDE;
 }
 
+TopoDS_Shape HYDROData_Channel::GetLeftShape() const
+{
+  HYDROData_SequenceOfObjects aGroups = GetGroups();
+  return HYDROData_Tool::getFirstShapeFromGroup( aGroups, 1);
+}
+
+TopoDS_Shape HYDROData_Channel::GetRightShape() const
+{
+  HYDROData_SequenceOfObjects aGroups = GetGroups();
+  return HYDROData_Tool::getFirstShapeFromGroup( aGroups, 2);
+}