OCC22138 Remove *.gxx files from Mesh algorithm
[occt.git] / src / BRepMesh / BRepMesh_CircleInspector.hxx
CommitLineData
0d88155b
O
1// File: BRepMesh_CircleInspector.hxx
2// Created: May 26 16:40:53 2008
3// Author: Ekaterina SMIRNOVA
4// Copyright: Open CASCADE SAS 2008
5
6
7#ifndef BRepMesh_CircleInspector_Header
8#define BRepMesh_CircleInspector_Header
9
10#include <BRepMesh_Circ.hxx>
11
12#include <BRepMesh_ListOfInteger.hxx>
13#include <Precision.hxx>
14#include <gp_XY.hxx>
15#include <gp_XYZ.hxx>
16
17#include <NCollection_CellFilter.hxx>
18#include <NCollection_Vector.hxx>
19
20typedef NCollection_Vector<BRepMesh_Circ> CircVector;
21
22//=======================================================================
23//! The class to find in the coincidence points
24//=======================================================================
25
26class BRepMesh_CircleInspector : public NCollection_CellFilter_InspectorXY
27{
28public:
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
32 //! consideration.
33 BRepMesh_CircleInspector (Standard_Real theTol,
34 Standard_Integer nbComp,
35 const BRepMesh_BaseAllocator& theAlloc);
36
37 void Add(Standard_Integer theInd,const BRepMesh_Circ& theCircle)
38 {
39 myInitCircle.SetValue(theInd, theCircle);
40 }
41
42 void ClerResList()
43 {
44 myResInd.Clear();
45 }
46
47 CircVector& MapOfCirc()
48 {
49 return myInitCircle;
50 }
51
52 BRepMesh_Circ& GetCirc(Standard_Integer theInd)
53 {
54 return myInitCircle(theInd);
55 }
56
57 //! Set current node to be checked
58 void SetCurrent (const gp_XY& theCurCircle)
59 {
60 myCurrent = theCurCircle;
61 }
62
63 //!Get result index of node
64 BRepMesh_ListOfInteger& GetCoincidentInd()
65 {
66 return myResInd;
67 }
68
69 //! Implementation of inspection method
70 NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget);
71
72 static Standard_Boolean IsEqual (Standard_Integer theIdx, const Standard_Integer theTarget)
73 {
74 return (theIdx == theTarget);
75 }
76
77private:
78 Standard_Real myTol;
79 BRepMesh_ListOfInteger myResInd;
80 CircVector myInitCircle;
81 gp_XY myCurrent;
82};
83
84#endif