1 // File: MeshAlgo_CircleInspector.hxx
2 // Created: May 26 16:40:53 2008
3 // Author: Ekaterina SMIRNOVA
4 // Copyright: Open CASCADE SAS 2008
7 #ifndef MeshAlgo_CircleInspector_Header
8 #define MeshAlgo_CircleInspector_Header
10 #include <MeshAlgo_Circ.hxx>
12 #include <MeshDS_ListOfInteger.hxx>
13 #include <Precision.hxx>
17 #include <NCollection_CellFilter.hxx>
18 #include <NCollection_Vector.hxx>
20 typedef NCollection_Vector<MeshAlgo_Circ> CircVector;
22 //=======================================================================
23 //! The class to find in the coincidence points
24 //=======================================================================
26 class MeshAlgo_CircleInspector : public NCollection_CellFilter_InspectorXY
29 typedef Standard_Integer Target;
30 //! Constructor; remembers tolerance and collector data structure.
31 //! All the found points are put in the map and excluded from further
33 MeshAlgo_CircleInspector (Standard_Real theTol,
34 Standard_Integer nbComp,
35 const MeshDS_BaseAllocator& theAlloc);
37 void Add(Standard_Integer theInd,const MeshAlgo_Circ& theCircle)
39 myInitCircle.SetValue(theInd, theCircle);
47 CircVector& MapOfCirc()
52 MeshAlgo_Circ& GetCirc(Standard_Integer theInd)
54 return myInitCircle(theInd);
57 //! Set current node to be checked
58 void SetCurrent (const gp_XY& theCurCircle)
60 myCurrent = theCurCircle;
63 //!Get result index of node
64 MeshDS_ListOfInteger& GetCoincidentInd()
69 //! Implementation of inspection method
70 NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget);
72 static Standard_Boolean IsEqual (Standard_Integer theIdx, const Standard_Integer theTarget)
74 return (theIdx == theTarget);
79 MeshDS_ListOfInteger myResInd;
80 CircVector myInitCircle;