X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_IPolyline.cxx;h=adc76d3b87fe47b3b677c041adabcca52240be77;hb=25c483f304a19aace130948fd7f6771bb82bd09c;hp=695bf84ae3713d30519400c084407bc1a978f863;hpb=d3d7ea6412ef12cf3ecdda87c52881fa03accfee;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_IPolyline.cxx b/src/HYDROData/HYDROData_IPolyline.cxx old mode 100755 new mode 100644 index 695bf84a..adc76d3b --- a/src/HYDROData/HYDROData_IPolyline.cxx +++ b/src/HYDROData/HYDROData_IPolyline.cxx @@ -24,12 +24,7 @@ #include #include #include - #include - -#include -#include - #include IMPLEMENT_STANDARD_HANDLE(HYDROData_IPolyline, HYDROData_Entity) @@ -64,29 +59,19 @@ int HYDROData_IPolyline::NbPoints( const int theSectionIndex ) const 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,