1 // Created on: 2011-11-24
2 // Created by: ANNA MASALSKAYA
3 // Copyright (c) 2011-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _BRepBuilderAPI_VertexInspector_Header
17 #define _BRepBuilderAPI_VertexInspector_Header
19 #include <TColStd_ListOfInteger.hxx>
20 #include <NCollection_Vector.hxx>
23 #include <NCollection_CellFilter.hxx>
25 typedef NCollection_Vector<gp_XYZ> VectorOfPoint;
27 //=======================================================================
28 //! Class BRepBuilderAPI_VertexInspector
29 //! derived from NCollection_CellFilter_InspectorXYZ
30 //! This class define the Inspector interface for CellFilter algorithm,
31 //! working with gp_XYZ points in 3d space.
32 //! Used in search of coincidence points with a certain tolerance.
33 //=======================================================================
35 class BRepBuilderAPI_VertexInspector : public NCollection_CellFilter_InspectorXYZ
38 typedef Standard_Integer Target;
39 //! Constructor; remembers the tolerance
40 BRepBuilderAPI_VertexInspector (const Standard_Real theTol):myTol(theTol*theTol)
43 //! Keep the points used for comparison
44 void Add (const gp_XYZ& thePnt)
46 myPoints.Append (thePnt);
49 //! Clear the list of adjacent points
55 //! Set current point to search for coincidence
56 void SetCurrent (const gp_XYZ& theCurPnt)
58 myCurrent = theCurPnt;
61 //! Get list of indexes of points adjacent with the current
62 const TColStd_ListOfInteger& ResInd()
67 //! Implementation of inspection method
68 Standard_EXPORT NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget);
72 TColStd_ListOfInteger myResInd;
73 VectorOfPoint myPoints;