X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_ProfileUZ.h;h=0e1dcd0d54892d29908675717db31e13894cb624;hb=216439f38d7dd618833b75c5dcb640915a62ba77;hp=608b695311c6f64505ad5d68e10eaf8cb41fe2b4;hpb=a23fa81dd76041264b4ddd65883ea9bfb7cc67bd;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_ProfileUZ.h b/src/HYDROData/HYDROData_ProfileUZ.h index 608b6953..0e1dcd0d 100644 --- a/src/HYDROData/HYDROData_ProfileUZ.h +++ b/src/HYDROData/HYDROData_ProfileUZ.h @@ -30,117 +30,128 @@ public: */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_PROFILEUZ;} - public: - // Implementation of IPolyline interface - /** * Returns the 3D presentation of all points. */ - HYDRODATA_EXPORT virtual ListAISObjects constructWire() const; - -public: - - // Implementation of ICurve interface - - - /***********************************************/ - /*** Section methods ***/ - /***********************************************/ - - //! Clear the polyline (remove all sections) - HYDRODATA_EXPORT virtual bool clear(); + HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const; - //! Join range of sections to one section (join all sections if -1 is passed in one of arguments) - HYDRODATA_EXPORT virtual bool join( const int theISectionTo = -1, - const int theISectionFrom = -1 ); - - //! Get number of sections - HYDRODATA_EXPORT virtual int getNbSections() const; - - //! Add a new section. - HYDRODATA_EXPORT virtual int addSection( const std::string& theName, - const CurveCreator::SectionType theType, - const bool theIsClosed ); + /** + * Returns the depth for given distance. + */ + HYDRODATA_EXPORT static double GetDepthFromDistance( const PointsList& thePoints, + const double& theDistance ); - //! Removes the given sections. - HYDRODATA_EXPORT virtual bool removeSection( const int theISection ); - //! Get "closed" flag of the specified section - HYDRODATA_EXPORT virtual bool isClosed( const int theISection ) const; + /** + * Returns number of sections. + */ + HYDRODATA_EXPORT virtual int NbSections() const; /** - * Set "closed" flag of the specified section (all sections if - * \a theISection is -1). + * Adds new one section. + * \param theSectName name of the section + * \param theSectionType type of section + * \param theIsClosed flag indicates closures of section */ - HYDRODATA_EXPORT virtual bool setClosed( const int theISection, - const bool theIsClosed ); + HYDRODATA_EXPORT virtual void AddSection( const TCollection_AsciiString& theSectName, + const SectionType theSectionType, + const bool theIsClosed ); - //! Returns specifyed section name - HYDRODATA_EXPORT virtual std::string getSectionName( const int theISection ) const; + /** + * Returns name of section with given index. + * \param theSectionIndex index of section + */ + HYDRODATA_EXPORT virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const; - /** Set name of the specified section */ - HYDRODATA_EXPORT virtual bool setSectionName( const int theISection, - const std::string& theName ); + /** + * Set name for section with given index. + * \param theSectionIndex index of section + * \param theSectionName new section name + */ + HYDRODATA_EXPORT virtual void SetSectionName( const int theSectionIndex, + const TCollection_AsciiString& theSectionName ); - //! Get type of the specified section - HYDRODATA_EXPORT virtual CurveCreator::SectionType getSectionType( const int theISection ) const; + /** + * Returns type of section with given index. + * \param theSectionIndex index of section + */ + HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const; /** - * Set type of the specified section (or all sections - * if \a theISection is -1). + * Set type for section with given index. + * \param theSectionIndex index of section + * \param theSectionType new section type */ - HYDRODATA_EXPORT virtual bool setSectionType( const int theISection, - const CurveCreator::SectionType theType ); + HYDRODATA_EXPORT virtual void SetSectionType( const int theSectionIndex, + const SectionType theSectionType ); + /** + * Returns true if section with given index is closed. + * \param theSectionIndex index of section + */ + HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const; - /***********************************************/ - /*** Point methods ***/ - /***********************************************/ + /** + * Set closed flag for section with given index. + * \param theSectionIndex index of section + * \param theIsClosed new closures state + */ + HYDRODATA_EXPORT virtual void SetSectionClosed( const int theSectionIndex, + const bool theIsClosed ); /** - * Insert one or several points to the specified section starting from the given theIPnt index - * (or add these at the end of section points if \a theIPnt is -1). + * Removes section with given index. + * \param theSectionIndex index of section */ - HYDRODATA_EXPORT virtual bool addPoints( const CurveCreator::Coordinates& theCoords, - const int theISection, - const int theIPnt = -1 ); + HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex ); - //! Set coordinates of specified point - HYDRODATA_EXPORT virtual bool setPoint( const int theISection, - const int theIPnt, - const CurveCreator::Coordinates& theCoords ); + /** + * Removes all sections. + */ + HYDRODATA_EXPORT virtual void RemoveSections(); - //! Set coordinates of specified points from different sections - HYDRODATA_EXPORT virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords); - //! Remove point with given id - HYDRODATA_EXPORT virtual bool removePoint( const int theISection, const int theIPnt = -1 ); + /** + * Adds new point for section with index "theSectionIndex". + * \param theSectionIndex index of section + * \param thePoint point to add + * \param theBeforeIndex if not equal -1 then insert point in this pos + */ + HYDRODATA_EXPORT virtual void AddPoint( const int theSectionIndex, + const Point& thePoint, + const int thePointIndex = -1 ); - //! Remove several points from different sections with given ids - HYDRODATA_EXPORT virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs); + /** + * Replaces point for section with index "theSectionIndex". + * \param theSectionIndex index of section + * \param thePoint new point + * \param thePointIndex index of point to replace + */ + HYDRODATA_EXPORT virtual void SetPoint( const int theSectionIndex, + const Point& thePoint, + const int thePointIndex ); /** - * Get points of a section (the total points in Curve if theISection is equal to -1).. + * Removes point from section with index "theSectionIndex". + * \param theSectionIndex index of section + * \param thePointIndex index of point */ - HYDRODATA_EXPORT virtual CurveCreator::Coordinates getPoints( const int theISection = -1 ) const; + HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex, + const int thePointIndex ); -protected: /** - * Insert point to the specified section after the given theIPnt index. - * (or add these at the end of section points if \a theIPnt is -1). + * Returns list of points. + * \param theSectionIndex if not equal -1 then list of points returned + * only for section with this index + * \return list of points */ - HYDRODATA_EXPORT virtual bool addPoint( - const CurveCreator::TypeCoord& theCoordX, - const CurveCreator::TypeCoord& theCoordY, - const int theISection, - const int theIPnt = -1 ); + HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const; protected: - friend class HYDROData_Profile; friend class HYDROData_Iterator; /**