X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Stream.cxx;h=0512e90a24474f6bc725a619338f792daac1ab70;hb=8c70d5cb1e04edf503afb50caf735fa1c4f45b25;hp=2b5d29ea8d4bb09c46c83f32a4fc1a6529160676;hpb=d1fb3cba49689a5773aaab41d638513026757fae;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 2b5d29ea..0512e90a 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -121,6 +121,9 @@ void HYDROData_Stream::Update() { a2dShellBuilder.Add( a2dShell, aMakeFace.Face() ); } + + aPrevFirstPoint = aCurFirstPoint; + aPrevLastPoint = aCurLastPoint; } SetTopShape( a2dShell ); @@ -132,9 +135,16 @@ void HYDROData_Stream::Update() bool HYDROData_Stream::SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis ) { Handle(HYDROData_PolylineXY) aPrevAxis = GetHydraulicAxis(); - if ( theAxis.IsNull() || IsEqual( aPrevAxis, theAxis ) ) + + if ( theAxis.IsNull() ) + { + RemoveHydraulicAxis(); + return !aPrevAxis.IsNull(); + } + + if ( IsEqual( aPrevAxis, theAxis ) ) return false; - + TopoDS_Wire aHydraulicWire = TopoDS::Wire( theAxis->GetShape() ); if ( aHydraulicWire.IsNull() ) return false; // The polyline must be a single wire @@ -243,6 +253,7 @@ void HYDROData_Stream::insertProfileInToOrder( const Handle(HYDROData_Profile)& return; // TODO + AddReferenceObject( theProfile, DataTag_Profile ); // temporary for testing only } void HYDROData_Stream::updateProfilesOrder()