X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_CalculationCase.h;h=ad8a5609ff3f752824364c250de9c020e15d3bd1;hb=bd81def133c235351f4c18834c6660450f16b9ee;hp=1a4eb3115bb565fa6739cdd2ccb5d625e4c50455;hpb=f169205c4f5f2d077a35ba9e1db8f143fbba70c3;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_CalculationCase.h b/src/HYDROData/HYDROData_CalculationCase.h index 1a4eb311..ad8a5609 100644 --- a/src/HYDROData/HYDROData_CalculationCase.h +++ b/src/HYDROData/HYDROData_CalculationCase.h @@ -24,6 +24,7 @@ #include #include #include +#include #ifdef WIN32 #pragma warning ( disable: 4251 ) @@ -43,23 +44,19 @@ class gp_XY; class TopoDS_Shape; class TopoDS_Shell; -class TopTools_ListOfShape; - -class Handle(HYDROData_Object); -class Handle(HYDROData_Region); -class Handle(HYDROData_Zone); -class Handle(HYDROData_PolylineXY); -class Handle(HYDROData_ShapesGroup); -class Handle(HYDROData_SplittedShapesGroup); -class Handle(HYDROData_Document); -class Handle(HYDROData_StricklerTable); -class Handle(HYDROData_LandCoverMap); - -DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity) +class HYDROData_Object; +class HYDROData_Region; +class HYDROData_Zone; +class HYDROData_PolylineXY; +class HYDROData_ShapesGroup; +class HYDROData_SplitShapesGroup; +class HYDROData_Document; +class HYDROData_StricklerTable; +class HYDROData_LandCoverMap; /**\class HYDROData_CalculationCase - * \brief Calculation case is defined by selection of Geometry objects with or without “Zone of water”. + * \brief Calculation case is defined by selection of Geometry objects with or without �Zone of water�. * */ class HYDROData_CalculationCase : public HYDROData_Entity @@ -92,22 +89,23 @@ public: DataTag_Region, ///< reference regions DataTag_Polyline, ///< reference boundary polyline DataTag_GeometryGroup, ///< reference geometry groups - DataTag_SplittedGroups, ///< reference splitted groups + DataTag_SplitGroups, ///< reference split groups DataTag_CustomRules, ///< custom rules DataTag_AssignmentMode, ///< assignment mode DataTag_StricklerTable, ///< reference Strickler table + DataTag_InterPoly, ///< intersection polyline DataTag_LandCover_Obsolete, ///< reference land covers DataTag_CustomLandCoverRules_Obsolete, ///< custom rules for land covers priority DataTag_AssignmentLandCoverMode_Obsolete, ///< assignment mode of land covers priority DataTag_ChildLandCoverRegion_Obsolete, ///< child land cover regions - DataTag_LandCoverRegion_Obsolete ///< reference land cover regions + DataTag_LandCoverRegion_Obsolete, ///< reference land cover regions + DataTag_LandCoverMap, ///< reference to land cover map }; public: - - DEFINE_STANDARD_RTTI(HYDROData_CalculationCase); + DEFINE_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. @@ -116,14 +114,15 @@ public: /** * Updates the name of this object. - * Reimplemented to update the names of regions, zones and splitted groups. + * Reimplemented to update the names of regions, zones and split groups. */ HYDRODATA_EXPORT virtual void SetName( const QString& theName ); /** * Dump Calculation object to Python script representation. */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; + HYDRODATA_EXPORT virtual QStringList DumpToPython( const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects ) const; /** * Update the calcualtion case object. @@ -219,7 +218,9 @@ public: * Returns reference Land Cover Map of calculation case. * \return the referenced Land Cover Map */ - HYDRODATA_EXPORT virtual Handle(HYDROData_LandCoverMap) GetLandCoverMap() const; + HYDRODATA_EXPORT Handle(HYDROData_LandCoverMap) GetLandCoverMap() const; + + HYDRODATA_EXPORT void SetLandCoverMap( const Handle(HYDROData_LandCoverMap)& ); /** * Add new one child region for calculation case. @@ -263,12 +264,18 @@ public: /** * Returns all reference geometry groups of calculation case. */ - HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetSplittedGroups() const; + HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetSplitGroups() const; /** * Removes all reference geometry groups from calculation case. */ - HYDRODATA_EXPORT virtual void RemoveSplittedGroups(); + HYDRODATA_EXPORT virtual void RemoveSplitGroups(); + + HYDRODATA_EXPORT virtual bool AddInterPoly( const Handle(HYDROData_PolylineXY)& theInterPolyline ); + + HYDRODATA_EXPORT virtual void RemoveInterPolyObject( const Handle(HYDROData_PolylineXY)& theInterPolyline ); + + HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetInterPolyObjects() const; /** * Exports the calculation case data (shell and groups) to GEOM module. @@ -289,7 +296,8 @@ public: HYDRODATA_EXPORT virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine, SALOMEDS::Study_ptr theStudy, QString& theGeomObjEntry, - QString& theErrorMsg ) const; + QString& theErrorMsg, + QString& statMess) const; #endif public: @@ -309,7 +317,8 @@ public: * \return result altitude value */ HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint, - const Handle(HYDROData_Region)& theRegion ) const; + const Handle(HYDROData_Region)& theRegion, + int theMethod = 0) const; /** * Returns altitude for given point on given zone. @@ -318,7 +327,8 @@ public: * \return result altitude value */ HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint, - const Handle(HYDROData_Zone)& theZone ) const; + const Handle(HYDROData_Zone)& theZone, + int theMethod = 0) const; /** * Returns strickler coefficient for given point. @@ -327,6 +337,12 @@ public: */ HYDRODATA_EXPORT double GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const; + HYDRODATA_EXPORT std::vector GetStricklerCoefficientForPoints(const std::vector& thePoints, + double DefValue, + bool UseMax ) const; + + HYDRODATA_EXPORT std::vector GetStricklerTypeForPoints( const std::vector& thePoints ) const; + /** * Returns altitudes for given points on given region. * \param thePoints the points to examine @@ -335,7 +351,8 @@ public: */ HYDRODATA_EXPORT virtual NCollection_Sequence GetAltitudesForPoints( const NCollection_Sequence& thePoints, - const Handle(HYDROData_Region)& theRegion ) const; + const Handle(HYDROData_Region)& theRegion, + int theMethod = 0) const; /** * Returns altitudes for given points on given zone. @@ -345,7 +362,8 @@ public: */ HYDRODATA_EXPORT virtual NCollection_Sequence GetAltitudesForPoints( const NCollection_Sequence& thePoints, - const Handle(HYDROData_Zone)& theZone ) const; + const Handle(HYDROData_Zone)& theZone, + int theMethod = 0) const; /** * Returns region to which the point is belongs. @@ -405,22 +423,22 @@ private: bool isPrefix = true ); /** - * Add new one splitted edges group for calculation case. + * Add new one split edges group for calculation case. */ - Handle(HYDROData_SplittedShapesGroup) addNewSplittedGroup( const QString& theName ); + Handle(HYDROData_SplitShapesGroup) addNewSplitGroup( const QString& theName ); /** * Exports the given faces as shell and the given groups to GEOM module. * \param theGeomEngine GEOM module engine * \param theStudy SALOMEDS study, is used for publishing of GEOM objects * \param theFaces the list of faces to make shell - * \param theSplittedGroups the list of groups + * \param theSplitGroups the list of groups * \return true in case of success */ #ifndef LIGHT_MODE bool Export( GEOM::GEOM_Gen_var theGeomEngine, SALOMEDS::Study_ptr theStudy, - const TopTools_ListOfShape& theFaces, + const NCollection_IndexedDataMap& aFacesToName, const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs, QString& theGeomObjEntry ) const; #endif @@ -441,8 +459,9 @@ private: const QString& theOldCaseName, const QString& theName ); - void DumpRegionsToPython( QStringList& theResList, - MapOfTreatedObjects& theTreatedObjects, + void DumpRegionsToPython( QStringList& theResList, + const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects, const HYDROData_SequenceOfObjects& theRegions ) const; protected: