// 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 // // 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. // // 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: /** * Update the shape presentations of stream. */ virtual void UpdatePrs(); /** * Returns default filling color for new stream. */ static QColor DefaultFillingColor(); /** * Returns default border color for new stream. */ static QColor DefaultBorderColor(); /** * Returns true if given polyline can be used as stream axis. */ static bool IsValidAsAxis( const Handle(HYDROData_PolylineXY)& theAxis ); 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 /** * Sets reference hydraulic axis object for stream. */ virtual bool SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis ); /** * Returns reference hydraulic axis object of stream. */ virtual Handle(HYDROData_PolylineXY) GetHydraulicAxis() const; /** * Remove reference hydraulic axis object from stream. */ virtual 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. */ virtual bool HasIntersection( const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane, Standard_Real& outPar) const; /** * Builds a planar face */ virtual bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis, TopoDS_Face& thePlane) const; /** * Add new one reference profile object for stream. */ virtual bool AddProfile( const Handle(HYDROData_Profile)& theProfile ); /** * Returns all reference profile objects of stream. */ virtual HYDROData_SequenceOfObjects GetProfiles() const; /** * Removes reference profile object from stream. */ virtual bool RemoveProfile( const Handle(HYDROData_Profile)& theProfile ); /** * Removes all reference profile objects from stream. */ virtual void RemoveProfiles(); 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(); };