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 )
QColor HYDROData_Object::GetFillingColor() const
{
- return GetColor( getDefaultFillingColor(), DataTag_FillingColor );
+ return GetColor( DefaultFillingColor(), DataTag_FillingColor );
}
void HYDROData_Object::SetBorderColor( const QColor& theColor )
QColor HYDROData_Object::GetBorderColor() const
{
- return GetColor( getDefaultBorderColor(), DataTag_BorderColor );
+ return GetColor( DefaultBorderColor(), DataTag_BorderColor );
}
-QColor HYDROData_Object::getDefaultFillingColor() const
+QColor HYDROData_Object::DefaultFillingColor() const
{
return QColor( Qt::yellow );
}
-QColor HYDROData_Object::getDefaultBorderColor() const
+QColor HYDROData_Object::DefaultBorderColor() const
{
return QColor( Qt::transparent );
}
QStringList aColorsDef;
QColor aFillingColor = GetFillingColor();
- setPythonObjectColor( aColorsDef, aFillingColor, getDefaultFillingColor(), "SetFillingColor" );
+ setPythonObjectColor( aColorsDef, aFillingColor, DefaultFillingColor(), "SetFillingColor" );
QColor aBorderColor = GetBorderColor();
- setPythonObjectColor( aColorsDef, aBorderColor, getDefaultBorderColor(), "SetBorderColor" );
+ setPythonObjectColor( aColorsDef, aBorderColor, DefaultBorderColor(), "SetBorderColor" );
if ( !aColorsDef.isEmpty() )
{