2 #ifndef HYDROData_Obstacle_HeaderFile
3 #define HYDROData_Obstacle_HeaderFile
5 #include "HYDROData_ArtificialObject.h"
7 DEFINE_STANDARD_HANDLE(HYDROData_Obstacle, HYDROData_ArtificialObject)
9 /**\class HYDROData_Obstacle
13 class HYDROData_Obstacle : public HYDROData_ArtificialObject
17 * Enumeration of tags corresponding to the persistent object parameters.
21 DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve
22 DataTag_GeomObjectEntry, ///< study entry of the imported GEOM object
23 DataTag_FilePath ///< imported file path
27 DEFINE_STANDARD_RTTI(HYDROData_Obstacle);
30 * Returns the kind of this object. Must be redefined in all objects of known type.
32 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_OBSTACLE;}
35 * Dump object to Python script representation.
37 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
40 * Returns the top shape of the object.
42 HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
45 * Returns the 3d shape of the object.
47 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
50 * Imports shape from file containing geometrical object and sets this
51 * shape as the obstacle shape.
52 * The supported file types:
57 * \param theFilePath the path to file
58 * \return \c true if file has been successfully read
60 HYDRODATA_EXPORT virtual bool ImportFromFile( const QString& theFilePath );
63 * Stores the file path of the imported file.
64 * \param theFilePath file path
66 HYDRODATA_EXPORT void SetFilePath(const QString& theFilePath);
69 * Returns the imported file path.
71 HYDRODATA_EXPORT QString GetFilePath() const;
74 * Stores the study entry of the imported GEOM object.
75 * \param theEntry GEOM object entry
77 HYDRODATA_EXPORT void SetGeomObjectEntry(const QString& theEntry);
80 * Returns the imported GEOM object entry.
82 HYDRODATA_EXPORT QString GetGeomObjectEntry() const;
86 friend class HYDROData_Iterator;
89 * Creates new object in the internal data structure. Use higher level objects
90 * to create objects with real content.
92 HYDRODATA_EXPORT HYDROData_Obstacle();
95 * Destructs properties of the object and object itself, removes it from the document.
97 virtual HYDRODATA_EXPORT ~HYDROData_Obstacle();
101 * Imports shape from the BREP file.
102 * \param theFilePath the path to file
103 * \return shape as TopoDS_Shape (null shape if import was failed)
105 TopoDS_Shape ImportBREP( const QString& theFilePath ) const;
108 * Imports shape from the IGES file.
109 * \param theFilePath the path to file
110 * \return shape as TopoDS_Shape (null shape if import was failed)
112 TopoDS_Shape ImportIGES( const QString& theFilePath ) const;
115 * Imports shape from the STEP file.
116 * \param theFilePath the path to file
117 * \return shape as TopoDS_Shape (null shape if import was failed)
119 TopoDS_Shape ImportSTEP( const QString& theFilePath ) const;