X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Bathymetry.cxx;h=73e763ef27ac061a40fb2c287de62773f01df5ba;hb=e744ba34fd38d6744d11b54cd15b6f86350695b2;hp=8bfffcfc5a8802fc7c094f6f6ed6df3adc296eda;hpb=f0688b4c39fcc3e49c2b58a90724b9c1c84f1337;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Bathymetry.cxx b/src/HYDROData/HYDROData_Bathymetry.cxx index 8bfffcfc..73e763ef 100644 --- a/src/HYDROData/HYDROData_Bathymetry.cxx +++ b/src/HYDROData/HYDROData_Bathymetry.cxx @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -95,10 +96,10 @@ void HYDROData_Bathymetry::SetAltitudePoints( const AltitudePoints& thePoints ) aCoordsArray->SetValue( i * 3 + 2, aPoint.Z() ); } - SetToUpdate( true ); + Changed( Geom_Z ); } -HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints() const +HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints(bool IsConvertToGlobal) const { AltitudePoints aPoints; @@ -110,6 +111,7 @@ HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints() c if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), aCoordsArray ) ) return aPoints; + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab ); for ( int i = aCoordsArray->Lower(), n = aCoordsArray->Upper(); i <= n; ) { if ( i + 3 > n + 1 ) @@ -120,6 +122,8 @@ HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints() c aPoint.SetY( aCoordsArray->Value( i++ ) ); aPoint.SetZ( aCoordsArray->Value( i++ ) ); + if( IsConvertToGlobal ) + aDoc->Transform( aPoint, false ); aPoints.Append( aPoint ); } @@ -132,7 +136,7 @@ void HYDROData_Bathymetry::RemoveAltitudePoints() if ( !aLabel.IsNull() ) { aLabel.ForgetAllAttributes(); - SetToUpdate( true ); + Changed( Geom_Z ); } } @@ -354,7 +358,7 @@ void HYDROData_Bathymetry::SetAltitudesInverted( const bool theIsInverted, TDataStd_Integer::Set( myLab.FindChild( DataTag_AltitudesInverted ), (Standard_Integer)theIsInverted ); - SetToUpdate( true ); + Changed( Geom_Z ); if ( !theIsUpdate ) return; @@ -626,6 +630,9 @@ Handle_HYDROData_PolylineXY HYDROData_Bathymetry::CreateBoundaryPolyline() const aResult->AddPoint( 0, HYDROData_IPolyline::Point( Xmin, Ymax ) ); aResult->AddPoint( 0, HYDROData_IPolyline::Point( Xmax, Ymax ) ); aResult->AddPoint( 0, HYDROData_IPolyline::Point( Xmax, Ymin ) ); + + aResult->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() ); + aResult->Update(); return aResult;