+ Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
+ Handle(GEOM_Object) theShapeWhat);
+
+ /*!
+ * \brief Searches a shape equal to theWhat in the context of theWhere
+ * \param theShapeWhere - a context shap
+ * \param theShapeWhat - a sample shape
+ * \retval Handle(GEOM_Object) - found shape
+ */
+ Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
+ const Handle(GEOM_Object)& theShapeWhat);
+
+ /*!
+ * \brief Find IDs of subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
+ GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
+ /*!
+ * \brief Find subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
+ */
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetShapesOnBox(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
+ /*!
+ * \brief Find IDs of subshapes complying with given status about surface
+ * \param theCheckShape - the shape to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
+ GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
+ /*!
+ * \brief Find subshapes complying with given status about surface
+ * \param theCheckShape - the shape to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
+ */
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+ Standard_EXPORT Handle(GEOM_Object)
+ GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
+ public:
+ /*!
+ * \brief Sort shapes in the list by their coordinates.
+ * \param SL The list of shapes to sort.
+ */
+ struct CompareShapes : public std::binary_function<TopoDS_Shape, TopoDS_Shape, bool>
+ {
+ CompareShapes (bool isOldSorting)
+ : myIsOldSorting(isOldSorting) {}
+
+ bool operator()(const TopoDS_Shape& lhs, const TopoDS_Shape& rhs);
+
+ typedef NCollection_DataMap<TopoDS_Shape, std::pair<double, double> > NCollection_DataMapOfShapeDouble;
+ NCollection_DataMapOfShapeDouble myMap;
+ bool myIsOldSorting;
+ };
+
+ Standard_EXPORT static void SortShapes (TopTools_ListOfShape& SL,
+ const Standard_Boolean isOldSorting = Standard_True);
+
+ /*!
+ * \brief Convert TopoDS_COMPSOLID to TopoDS_COMPOUND.
+ *
+ * If the argument shape is not of type TopoDS_COMPSOLID, this method returns it as is.
+ *
+ * \param theCompsolid The compsolid to be converted.
+ * \retval TopoDS_Shape Returns the resulting compound.
+ */
+ Standard_EXPORT static TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid);
+
+ /*!
+ * \brief Build a triangulation on \a theShape if it is absent.
+ * \param theShape The shape to check/build triangulation on.
+ * \retval bool Returns false if the shape has no faces, i.e. impossible to build triangulation.
+ */
+ Standard_EXPORT static bool CheckTriangulation (const TopoDS_Shape& theShape);
+
+ /*!
+ * \brief Return type of shape for explode. In case of compound it will be a type of its first sub shape.
+ * \param theShape The shape to get type of.
+ * \retval TopAbs_ShapeEnum Return type of shape for explode.
+ */
+ Standard_EXPORT static TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape);