X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Stream.sip;h=cb233c5c8f03c41143c9cc5766f7dbae654ecdca;hb=5c4e50dc9c57c22ea5d7422ca12ce95e45010950;hp=07c05255dccddb6cc587e075cf7f488d87232be2;hpb=e9f46d8c7fb4636b279c2d1435b7a304a155d9fb;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Stream.sip b/src/HYDROPy/HYDROData_Stream.sip index 07c05255..cb233c5c 100644 --- a/src/HYDROPy/HYDROData_Stream.sip +++ b/src/HYDROPy/HYDROData_Stream.sip @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,25 +27,20 @@ class HYDROData_Stream : public HYDROData_NaturalObject %End public: - /** - * Update the shape presentations of stream. - */ - void UpdatePrs(); - /** * Returns default filling color for new stream. */ - static QColor DefaultFillingColor(); + virtual QColor DefaultFillingColor() const; /** * Returns default border color for new stream. */ - static QColor DefaultBorderColor(); + virtual QColor DefaultBorderColor() const; /** * Returns true if given polyline can be used as stream axis. */ - static bool IsValidAsAxis( HYDROData_PolylineXY theAxis ) + static bool IsValidAsAxis( HYDROData_PolylineXY theAxis ) [bool ( const Handle_HYDROData_PolylineXY& )]; %MethodCode Handle(HYDROData_PolylineXY) aRef = @@ -62,14 +53,14 @@ public: } %End -public: +public: // Public methods to work with Stream data fields /** * Sets reference hydraulic axis object for stream. */ bool SetHydraulicAxis( HYDROData_PolylineXY theAxis ) - [bool ( const Handle_HYDROData_PolylineXY& )]; + [bool ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_PolylineXY) aRef = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) ); @@ -86,15 +77,15 @@ public: * Returns reference hydraulic axis object of stream. */ HYDROData_PolylineXY GetHydraulicAxis() const - [Handle_HYDROData_PolylineXY ()]; + [opencascade::handle ()]; %MethodCode Handle(HYDROData_PolylineXY) aRef; - + Py_BEGIN_ALLOW_THREADS - aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() : + aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() : sipCpp->GetHydraulicAxis(); Py_END_ALLOW_THREADS - + sipRes = (HYDROData_PolylineXY*)createPointer( aRef ); %End @@ -107,7 +98,7 @@ public: * Add new one reference profile object for stream. */ bool AddProfile( HYDROData_Profile theProfile ) - [bool ( const Handle_HYDROData_Profile& )]; + [bool ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_Profile) aRef = Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) ); @@ -129,7 +120,7 @@ public: * Removes reference profile object from stream. */ bool RemoveProfile( HYDROData_Profile theProfile ) - [bool ( const Handle_HYDROData_Profile& )]; + [bool ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_Profile) aRef = Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) ); @@ -146,10 +137,65 @@ public: * Removes all reference profile objects from stream. */ void RemoveProfiles(); - + + /** + * Generates bottom polyline for stream or update the existing bottom polyline. + */ + bool GenerateBottomPolyline(); + + /** + * Returns reference bottom polyline object of stream. + */ + HYDROData_Polyline3D GetBottomPolyline() const + [opencascade::handle ()]; + %MethodCode + Handle(HYDROData_Polyline3D) aRef; + + Py_BEGIN_ALLOW_THREADS + aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetBottomPolyline() : + sipCpp->GetBottomPolyline(); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_Polyline3D*)createPointer( aRef ); + %End + + /** + * Sets reference bottom polyline object for stream. + */ + bool SetBottomPolyline( HYDROData_Polyline3D theBottom ) + [bool ( const opencascade::handle& )]; + %MethodCode + Handle(HYDROData_Polyline3D) aRef = + Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) ); + if ( !aRef.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::SetBottomPolyline( aRef ): + sipCpp->SetBottomPolyline( aRef ); + Py_END_ALLOW_THREADS + } + %End + + /** + * Add interpolated profiles into the stream. + * \param theInterpolator the interpolator + * \return true in case of success + */ + virtual bool Interpolate( HYDROData_IProfilesInterpolator* theInterpolator ); + + /** + * Set vertical slicing step for profiles interpolation. + */ + void SetDDZ( double theDDZ ); + + /** + * Set horizontal step for profiles interpolation. + */ + void SetSpatialStep( double theSpatialStep ); + protected: /** - * Creates new object in the internal data structure. Use higher level objects + * Creates new object in the internal data structure. Use higher level objects * to create objects with real content. */ HYDROData_Stream();