#include <TDataStd_ExtStringList.hxx>
#include <TDataStd_IntegerList.hxx>
#include <TDataStd_RealList.hxx>
-
#include <TopoDS_Shape.hxx>
-
-#include <TNaming_Builder.hxx>
-#include <TNaming_NamedShape.hxx>
-
#include <QColor>
-IMPLEMENT_STANDARD_HANDLE(HYDROData_IPolyline, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IPolyline, HYDROData_Entity)
HYDROData_IPolyline::HYDROData_IPolyline()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
{
}
return GetPoints( theSectionIndex ).Length();
}
-TopoDS_Shape HYDROData_IPolyline::getPolylineShape() const
+TopoDS_Shape HYDROData_IPolyline::GetShape() const
{
- TDF_Label aShapeLabel = myLab.FindChild( DataTag_PolylineShape, false );
- if ( !aShapeLabel.IsNull() )
- {
- Handle(TNaming_NamedShape) aNamedShape;
- if ( aShapeLabel.FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) )
- return aNamedShape->Get();
- }
- return TopoDS_Shape();
+ return HYDROData_Entity::GetShape( DataTag_PolylineShape );
}
-void HYDROData_IPolyline::setPolylineShape( const TopoDS_Shape& theShape )
+void HYDROData_IPolyline::SetShape( const TopoDS_Shape& theShape )
{
- TNaming_Builder aBuilder( myLab.FindChild( DataTag_PolylineShape ) );
- aBuilder.Generated( theShape );
+ HYDROData_Entity::SetShape( DataTag_PolylineShape, theShape );
}
-void HYDROData_IPolyline::removePolylineShape()
+void HYDROData_IPolyline::RemovePolylineShape()
{
- TDF_Label aShapeLabel = myLab.FindChild( DataTag_PolylineShape, false );
- if ( !aShapeLabel.IsNull() )
- aShapeLabel.ForgetAllAttributes();
+ SetShape( TopoDS_Shape() );
}
void HYDROData_IPolyline::getSectionsLists( Handle(TDataStd_ExtStringList)& theNamesList,