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:
*/
HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+ /**
+ * Update the immersible zone object.
+ * Call this method whenever you made changes for object data.
+ */
+ HYDRODATA_EXPORT virtual void Update();
+
/**
* Returns the top shape of the object.
*/
*/
HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
+ /**
+ * Returns default filling color for new obstacle.
+ */
+ HYDRODATA_EXPORT static QColor DefaultFillingColor();
+
+ /**
+ * Returns default border color for new obstacle.
+ */
+ HYDRODATA_EXPORT static QColor DefaultBorderColor();
+
+
+ /**
+ * Sets the 3d shape of the object.
+ */
+ HYDRODATA_EXPORT virtual void SetShape3D( const TopoDS_Shape& theShape );
+
+public:
+
+ /**
+ * 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:
+
+ /**
+ * Returns default filling color for new object.
+ */
+ HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
+
+ /**
+ * Returns default border color for new object.
+ */
+ HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
+
+ /**
+ * Create all necessary child group objects.
+ */
+ HYDRODATA_EXPORT virtual void createGroupObjects();
+
protected:
friend class HYDROData_Iterator;
* 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