|
|
|||
File indexing completed on 2026-06-15 08:29: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 0039 //! Constructor; remembers the tolerance 0040 BRepBuilderAPI_VertexInspector(const Standard_Real theTol) 0041 : myTol(theTol * theTol) 0042 { 0043 } 0044 0045 //! Keep the points used for comparison 0046 void Add(const gp_XYZ& thePnt) { myPoints.Append(thePnt); } 0047 0048 //! Clear the list of adjacent points 0049 void ClearResList() { myResInd.Clear(); } 0050 0051 //! Set current point to search for coincidence 0052 void SetCurrent(const gp_XYZ& theCurPnt) { myCurrent = theCurPnt; } 0053 0054 //! Get list of indexes of points adjacent with the current 0055 const TColStd_ListOfInteger& ResInd() { return myResInd; } 0056 0057 //! Implementation of inspection method 0058 Standard_EXPORT NCollection_CellFilter_Action Inspect(const Standard_Integer theTarget); 0059 0060 private: 0061 Standard_Real myTol; 0062 TColStd_ListOfInteger myResInd; 0063 VectorOfPoint myPoints; 0064 gp_XYZ myCurrent; 0065 }; 0066 0067 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|