// 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, 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 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // %ExportedHeaderCode #include "HYDROData_Stream.h" %End class HYDROData_Stream : public HYDROData_NaturalObject { %TypeHeaderCode #include "HYDROData_Stream.h" %End public: /** * Returns default filling color for new stream. */ virtual QColor DefaultFillingColor() const; /** * Returns default border color for new stream. */ virtual QColor DefaultBorderColor() const; /** * Returns true if given polyline can be used as stream axis. */ static bool IsValidAsAxis( HYDROData_PolylineXY theAxis ) [bool ( const Handle_HYDROData_PolylineXY& )]; %MethodCode Handle(HYDROData_PolylineXY) aRef = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipRes = HYDROData_Stream::IsValidAsAxis( aRef ); Py_END_ALLOW_THREADS } %End public: // Public methods to work with Stream data fields /** * Sets reference hydraulic axis object for stream. */ bool SetHydraulicAxis( HYDROData_PolylineXY theAxis ) [bool ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_PolylineXY) aRef = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::SetHydraulicAxis( aRef ): sipCpp->SetHydraulicAxis( aRef ); Py_END_ALLOW_THREADS } %End /** * Returns reference hydraulic axis object of stream. */ HYDROData_PolylineXY GetHydraulicAxis() const [opencascade::handle ()]; %MethodCode Handle(HYDROData_PolylineXY) aRef; Py_BEGIN_ALLOW_THREADS aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() : sipCpp->GetHydraulicAxis(); Py_END_ALLOW_THREADS sipRes = (HYDROData_PolylineXY*)createPointer( aRef ); %End /** * Remove reference hydraulic axis object from stream. */ void RemoveHydraulicAxis(); /** * Add new one reference profile object for stream. */ bool AddProfile( HYDROData_Profile theProfile ) [bool ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_Profile) aRef = Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::AddProfile( aRef ): sipCpp->AddProfile( aRef ); Py_END_ALLOW_THREADS } %End /** * Returns all reference profile objects of stream. */ HYDROData_SequenceOfObjects GetProfiles() const; /** * Removes reference profile object from stream. */ bool RemoveProfile( HYDROData_Profile theProfile ) [bool ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_Profile) aRef = Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::RemoveProfile( aRef ): sipCpp->RemoveProfile( aRef ); Py_END_ALLOW_THREADS } %End /** * 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 /** * Sets the left bank object for stream. (LISM method only) */ void SetLeftBank( HYDROData_PolylineXY theBank ) [void ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_PolylineXY) aRef = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipSelfWasArg ? sipCpp->HYDROData_Stream::SetLeftBank( aRef ): sipCpp->SetLeftBank( aRef ); Py_END_ALLOW_THREADS } %End /** * Returns the left bank object of stream. (LISM method only) */ HYDROData_PolylineXY GetLeftBank() const [opencascade::handle ()]; %MethodCode Handle(HYDROData_PolylineXY) aRef; Py_BEGIN_ALLOW_THREADS aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetLeftBank() : sipCpp->GetLeftBank(); Py_END_ALLOW_THREADS sipRes = (HYDROData_PolylineXY*)createPointer( aRef ); %End /** * Sets the right bank object for stream. (LISM method only) */ void SetRightBank( HYDROData_PolylineXY theBank ) [void ( const opencascade::handle& )]; %MethodCode Handle(HYDROData_PolylineXY) aRef = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipSelfWasArg ? sipCpp->HYDROData_Stream::SetRightBank( aRef ): sipCpp->SetRightBank( aRef ); Py_END_ALLOW_THREADS } %End /** * Returns the right bank object of stream. (LISM method only) */ HYDROData_PolylineXY GetRightBank() const [opencascade::handle ()]; %MethodCode Handle(HYDROData_PolylineXY) aRef; Py_BEGIN_ALLOW_THREADS aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetRightBank() : sipCpp->GetRightBank(); Py_END_ALLOW_THREADS sipRes = (HYDROData_PolylineXY*)createPointer( aRef ); %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. (DTM method only) */ void SetDDZ( double theDDZ ); /** * Set horizontal step for profiles interpolation. (DTM method only) */ void SetSpatialStep( double theSpatialStep ); /** * Set interpolation method (DTM or LISM). */ void SetInterpolationMethod( int theMode ); /** * Set horizontal step on hydr. axis for profiles interpolation. (LISM method) */ void SetHaxStep( double theHaxStep ); /** * Set number of points on profiles to insert (LISM method) */ void SetNbProfilePoints( int theNbPoints ); protected: /** * Creates new object in the internal data structure. Use higher level objects * to create objects with real content. */ HYDROData_Stream(); /** * Destructs properties of the object and object itself, removes it from the document. */ virtual ~HYDROData_Stream(); };