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;
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 )
aPoint.SetY( aCoordsArray->Value( i++ ) );
aPoint.SetZ( aCoordsArray->Value( i++ ) );
+ if( IsConvertToGlobal )
+ aDoc->Transform( aPoint, false );
aPoints.Append( aPoint );
}
void HYDROData_Bathymetry::RemoveAltitudePoints()
{
- TDF_Label aLabel = myLab.FindChild(DataTag_AltitudePoints, false);
- if (!aLabel.IsNull())
- {
- aLabel.ForgetAllAttributes();
- SetToUpdate(true);
- }
+ TDF_Label aLabel = myLab.FindChild( DataTag_AltitudePoints, false );
+ if ( !aLabel.IsNull() )
+ {
+ aLabel.ForgetAllAttributes();
+ Changed( Geom_Z );
+ }
}
void interpolateAltitudeForPoints( const gp_XY& thePoint,
double HYDROData_Bathymetry::GetAltitudeForPoint(const gp_XY& thePoint) const
{
- //DEBTRACE("GetAltitudeForPoint p(" << thePoint.X() << ", " << thePoint.Y() << ")");
+ DEBTRACE("GetAltitudeForPoint p(" << thePoint.X() << ", " << thePoint.Y() << ")");
double anInvalidAltitude = GetInvalidAltitude();
double aResAltitude = anInvalidAltitude;
TDataStd_Integer::Set( myLab.FindChild( DataTag_AltitudesInverted ), (Standard_Integer)theIsInverted );
- SetToUpdate( true );
+ Changed( Geom_Z );
if ( !theIsUpdate )
return;