|
||||
File indexing completed on 2025-01-18 10:03:09
0001 // Created on: 2011-11-24 0002 // Created by: ANNA MASALSKAYA 0003 // Copyright (c) 2011-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef BRepBuilderAPI_VertexInspector_HeaderFile 0017 #define BRepBuilderAPI_VertexInspector_HeaderFile 0018 0019 #include <TColStd_ListOfInteger.hxx> 0020 #include <NCollection_Vector.hxx> 0021 #include <gp_XYZ.hxx> 0022 #include <NCollection_CellFilter.hxx> 0023 0024 typedef NCollection_Vector<gp_XYZ> VectorOfPoint; 0025 0026 //======================================================================= 0027 //! Class BRepBuilderAPI_VertexInspector 0028 //! derived from NCollection_CellFilter_InspectorXYZ 0029 //! This class define the Inspector interface for CellFilter algorithm, 0030 //! working with gp_XYZ points in 3d space. 0031 //! Used in search of coincidence points with a certain tolerance. 0032 //======================================================================= 0033 0034 class BRepBuilderAPI_VertexInspector : public NCollection_CellFilter_InspectorXYZ 0035 { 0036 public: 0037 typedef Standard_Integer Target; 0038 //! Constructor; remembers the tolerance 0039 BRepBuilderAPI_VertexInspector (const Standard_Real theTol):myTol(theTol*theTol) 0040 {} 0041 0042 //! Keep the points used for comparison 0043 void Add (const gp_XYZ& thePnt) 0044 { 0045 myPoints.Append (thePnt); 0046 } 0047 0048 //! Clear the list of adjacent points 0049 void ClearResList() 0050 { 0051 myResInd.Clear(); 0052 } 0053 0054 //! Set current point to search for coincidence 0055 void SetCurrent (const gp_XYZ& theCurPnt) 0056 { 0057 myCurrent = theCurPnt; 0058 } 0059 0060 //! Get list of indexes of points adjacent with the current 0061 const TColStd_ListOfInteger& ResInd() 0062 { 0063 return myResInd; 0064 } 0065 0066 //! Implementation of inspection method 0067 Standard_EXPORT NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget); 0068 0069 private: 0070 Standard_Real myTol; 0071 TColStd_ListOfInteger myResInd; 0072 VectorOfPoint myPoints; 0073 gp_XYZ myCurrent; 0074 }; 0075 0076 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |