IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity)
-HYDROData_Object::HYDROData_Object()
-: HYDROData_Entity()
+HYDROData_Object::HYDROData_Object( Geometry theGeometry )
+ : HYDROData_Entity( theGeometry )
{
}
void HYDROData_Object::Update()
{
- removeTopShape();
- removeShape3D();
- removeGroupObjects();
+ if( IsMustBeUpdated( Geom_2d ) )
+ {
+ removeTopShape();
+ removeGroupObjects();
+ }
+ if( IsMustBeUpdated( Geom_3d ) )
+ removeShape3D();
+
checkAndSetAltitudeObject();
HYDROData_Entity::Update();
}
return aResSeq;
}
-void HYDROData_Object::SetToUpdate( bool theFlag )
+void HYDROData_Object::Changed( Geometry theChangedGeometry )
{
- HYDROData_Entity::SetToUpdate( theFlag );
+ HYDROData_Entity::Changed( theChangedGeometry );
Handle(HYDROData_DummyObject3D) anObject3D = GetObject3D();
if ( !anObject3D.IsNull() )
- anObject3D->SetToUpdate( theFlag );
+ anObject3D->Changed( theChangedGeometry );
}
void HYDROData_Object::SetTopShape( const TopoDS_Shape& theShape )
checkAndSetObject3D();
}
-Standard_Boolean HYDROData_Object::GetMiddleZ( Standard_Real& theMiddleZ ) const
-{
- theMiddleZ = -9999;
- TDF_Label aLabel = myLab.FindChild( DataTag_MiddleZ, false );
- if ( !aLabel.IsNull() )
- {
- Handle(TDataStd_Real) aRealVal;
- if ( aLabel.FindAttribute( TDataStd_Real::GetID(), aRealVal ) )
- {
- theMiddleZ = aRealVal->Get();
- return Standard_True;
- }
- }
-
- return Standard_False;
-
-}
-
-void HYDROData_Object::SetMiddleZ( const Standard_Real& theMiddleZ )
-{
- TDataStd_Real::Set( myLab.FindChild( DataTag_MiddleZ ), theMiddleZ );
-}
-
Handle(HYDROData_DummyObject3D) HYDROData_Object::GetObject3D() const
{
Handle(HYDROData_DummyObject3D) anObject;
SetReferenceObject( theAltitude, DataTag_AltitudeObject );
- // Indicate model of the need to update object
- SetToUpdate( true );
+ // #636: In the case of the altitude object change the geometry of the main object is not changed,
+ // to the object should not be marked as updated
+ //SetToUpdate( true );
return true;
}
ClearReferenceObjects( DataTag_AltitudeObject );
- // Indicate model of the need to update object
- SetToUpdate( true );
+ // #636: In the case of the altitude object change the geometry of the main object is not changed,
+ // to the object should not be marked as updated
+ //SetToUpdate( true );
}
void HYDROData_Object::SetFillingColor( const QColor& theColor )