X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Channel.cxx;h=9a8fae8657a8a4250d6aa3263216fb65d23de6a4;hb=545854182f0363f61284d5abe34c3627d4f3b088;hp=a2bb6f47f942b7eff54e58cfebe2fd0067187877;hpb=5af3b9f9b6d4827b1ba04b7618539bbcd2a704c8;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Channel.cxx b/src/HYDROData/HYDROData_Channel.cxx index a2bb6f47..9a8fae86 100644 --- a/src/HYDROData/HYDROData_Channel.cxx +++ b/src/HYDROData/HYDROData_Channel.cxx @@ -25,8 +25,8 @@ #include "HYDROData_Projection.h" #include "HYDROData_ShapesGroup.h" #include "HYDROData_ShapesTool.h" -#include "HYDROData_Pipes.h" #include "HYDROData_Stream.h" +#include "HYDROData_Tool.h" #include @@ -72,7 +72,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Channel,HYDROData_ArtificialObject) HYDROData_Channel::HYDROData_Channel() -: HYDROData_ArtificialObject() +: HYDROData_ArtificialObject( Geom_3d ) { } @@ -113,16 +113,6 @@ HYDROData_SequenceOfObjects HYDROData_Channel::GetAllReferenceObjects() const return aResSeq; } -TopoDS_Shape HYDROData_Channel::GetTopShape() const -{ - return getTopShape(); -} - -TopoDS_Shape HYDROData_Channel::GetShape3D() const -{ - return getShape3D(); -} - bool HYDROData_Channel::CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine, const Handle(HYDROData_Profile)& theProfile, PrsDefinition& thePrs ) @@ -352,26 +342,16 @@ bool HYDROData_Channel::IsHas2dPrs() const return true; } -QColor HYDROData_Channel::DefaultFillingColor() +QColor HYDROData_Channel::DefaultFillingColor() const { return QColor( Qt::blue ); } -QColor HYDROData_Channel::DefaultBorderColor() +QColor HYDROData_Channel::DefaultBorderColor() const { return QColor( Qt::transparent ); } -QColor HYDROData_Channel::getDefaultFillingColor() const -{ - return DefaultFillingColor(); -} - -QColor HYDROData_Channel::getDefaultBorderColor() const -{ - return DefaultBorderColor(); -} - bool HYDROData_Channel::SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine ) { Handle(HYDROData_Polyline3D) aPrevGuideLine = GetGuideLine(); @@ -392,7 +372,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 ); + Changed( Geom_3d ); return true; } @@ -412,7 +392,7 @@ void HYDROData_Channel::RemoveGuideLine() ClearReferenceObjects( DataTag_GuideLine ); // Indicate model of the need to update the chanel presentation - SetToUpdate( true ); + Changed( Geom_3d ); } bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile ) @@ -431,7 +411,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 ); + Changed( Geom_3d ); return true; } @@ -451,11 +431,22 @@ void HYDROData_Channel::RemoveProfile() ClearReferenceObjects( DataTag_Profile ); // Indicate model of the need to update the chanel presentation - SetToUpdate( true ); + Changed( Geom_3d ); } 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); +}