#include "HYDROData_Iterator.h"
#include "HYDROData_NaturalObject.h"
+#include <TopoDS_Shape.hxx>
+
+#include <TopTools_SequenceOfShape.hxx>
+
+#include <TopExp_Explorer.hxx>
+
#include <QFile>
#include <QStringList>
#include <QTextStream>
return theObject->IsKind( STANDARD_TYPE(HYDROData_ArtificialObject) ) ||
theObject->IsKind( STANDARD_TYPE(HYDROData_NaturalObject) );
}
+
+void HYDROData_Tool::ExploreShapeToShapes( const TopoDS_Shape& theInShape,
+ const TopAbs_ShapeEnum& theExpType,
+ TopTools_SequenceOfShape& theOutShapes )
+{
+ theOutShapes.Clear();
+
+ if ( theInShape.IsNull() )
+ return;
+
+ TopExp_Explorer anExp( theInShape, theExpType );
+ for ( ; anExp.More(); anExp.Next() )
+ {
+ TopoDS_Shape anExpShape = anExp.Current();
+ theOutShapes.Append( anExpShape );
+ }
+}
+
#include <Precision.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+
#include <QString>
#include <QStringList>
class QFile;
+class TopoDS_Shape;
+class TopTools_SequenceOfShape;
class Handle(HYDROData_Document);
class HYDRODATA_EXPORT HYDROData_Tool {
*/
static bool IsGeometryObject( const Handle(HYDROData_Entity)& theObject );
+ /**
+ * \brief Explore the incoming shape to shapes with given type.
+ * \param theInShape object to explore
+ * \param theExpType type to explore
+ * \param theOutShapes[out] list of result shapes if any
+ */
+ static void ExploreShapeToShapes( const TopoDS_Shape& theInShape,
+ const TopAbs_ShapeEnum& theExpType,
+ TopTools_SequenceOfShape& theOutShapes );
+
};
inline bool ValuesEquals( const double& theFirst, const double& theSecond )