X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Stream.sip;h=4bb209e6f2f8897e0951f8afc07ef352c553f498;hb=743e3da9cea294eb30ea8b16e7f6992a39a8a50a;hp=6fc7a002a055b37350968aaf9a1d38b5abe4ddfc;hpb=373b25511ebe691dc0e332996521c0de189f6db2;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Stream.sip b/src/HYDROPy/HYDROData_Stream.sip index 6fc7a002..4bb209e6 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 @@ -39,12 +35,12 @@ public: /** * 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. @@ -62,30 +58,6 @@ public: } %End -public: - // Public methods to work with Stream presentation - - /** - * Returns the left edge of the stream. - */ -// virtual TopoDS_Shape GetLeftShape() const; - - /** - * Returns the right edge of the stream. - */ -// virtual TopoDS_Shape GetRightShape() const; - - /** - * Returns the inlet edge of the stream. - */ -// virtual TopoDS_Shape GetInletShape() const; - - /** - * Returns the outlet edge of the stream. - */ -// virtual TopoDS_Shape GetOutletShape() const; - - public: // Public methods to work with Stream data fields @@ -127,28 +99,6 @@ public: */ void RemoveHydraulicAxis(); - /** - * Returns true if profile has the intersection with the given hydraulic axis. - * Returns the parameter of inresection point on axis if axis is presented by one curve, - * if axis presented by set of edges the returns a common length of segments till the intersection point. - */ -// static bool HasIntersection( const Handle(HYDROData_PolylineXY)& theHydAxis, -// const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane, -// Standard_Real& outPar); - - /** - * Returns true if profile has the intersection with reference hydraulic axis. - * Returns the parameter of inresection point on axis if axis is presented by one curve, - * if axis presented by set of edges the returns a common length of segments till the intersection point. - */ -// bool HasIntersection( const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane, -// Standard_Real& outPar) const; - - /** - * Builds a planar face - */ -// bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis, TopoDS_Face& thePlane) const; - /** * Add new one reference profile object for stream. */ @@ -192,7 +142,52 @@ 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 + [Handle_HYDROData_Polyline3D ()]; + %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 Handle_HYDROData_Polyline3D& )]; + %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 ); + protected: /** * Creates new object in the internal data structure. Use higher level objects