X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Obstacle.h;h=66db4c38014608aeb4f06a83c054853ad5ca8768;hb=deed826b2d6c39ba2ed410108cdf54d64cded321;hp=0a728c0acd872d39815ff18ba4c63781ebbaa078;hpb=7b9454f8053b968f127bf7981eb05b6749e261f4;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Obstacle.h b/src/HYDROData/HYDROData_Obstacle.h index 0a728c0a..66db4c38 100644 --- a/src/HYDROData/HYDROData_Obstacle.h +++ b/src/HYDROData/HYDROData_Obstacle.h @@ -19,6 +19,8 @@ protected: enum DataTag { DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve + DataTag_GeomObjectEntry, ///< study entry of the imported GEOM object + DataTag_FilePath ///< imported file path }; public: @@ -44,6 +46,41 @@ public: */ HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const; + /** + * Imports shape from file containing geometrical object and sets this + * shape as the obstacle shape. + * The supported file types: + * - BREP + * - IGES + * - STEP + * - ACIS + * \param theFilePath the path to file + * \return \c true if file has been successfully read + */ + HYDRODATA_EXPORT virtual bool ImportFromFile( const QString& theFilePath ); + + /** + * Stores the file path of the imported file. + * \param theFilePath file path + */ + HYDRODATA_EXPORT void SetFilePath(const QString& theFilePath); + + /** + * Returns the imported file path. + */ + HYDRODATA_EXPORT QString GetFilePath() const; + + /** + * Stores the study entry of the imported GEOM object. + * \param theEntry GEOM object entry + */ + HYDRODATA_EXPORT void SetGeomObjectEntry(const QString& theEntry); + + /** + * Returns the imported GEOM object entry. + */ + HYDRODATA_EXPORT QString GetGeomObjectEntry() const; + protected: friend class HYDROData_Iterator; @@ -58,6 +95,28 @@ protected: * Destructs properties of the object and object itself, removes it from the document. */ virtual HYDRODATA_EXPORT ~HYDROData_Obstacle(); + +private: + /** + * Imports shape from the BREP file. + * \param theFilePath the path to file + * \return shape as TopoDS_Shape (null shape if import was failed) + */ + TopoDS_Shape ImportBREP( const QString& theFilePath ) const; + + /** + * Imports shape from the IGES file. + * \param theFilePath the path to file + * \return shape as TopoDS_Shape (null shape if import was failed) + */ + TopoDS_Shape ImportIGES( const QString& theFilePath ) const; + + /** + * Imports shape from the STEP file. + * \param theFilePath the path to file + * \return shape as TopoDS_Shape (null shape if import was failed) + */ + TopoDS_Shape ImportSTEP( const QString& theFilePath ) const; }; #endif