File indexing completed on 2026-09-13 09:15:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BRepBuilderAPI_VertexInspector_HeaderFile
0017 #define BRepBuilderAPI_VertexInspector_HeaderFile
0018
0019 #include <Standard_Integer.hxx>
0020 #include <NCollection_List.hxx>
0021 #include <NCollection_DynamicArray.hxx>
0022 #include <gp_XYZ.hxx>
0023 #include <NCollection_CellFilter.hxx>
0024
0025 typedef NCollection_DynamicArray<gp_XYZ> VectorOfPoint;
0026
0027
0028
0029
0030 class BRepBuilderAPI_VertexInspector
0031 {
0032 public:
0033 static constexpr int Dimension = 3;
0034
0035 typedef gp_XYZ Point;
0036 typedef int Target;
0037
0038 static double Coord(int i, const Point& thePnt) { return thePnt.Coord(i + 1); }
0039
0040 static Point Shift(const Point& thePnt, double theTol)
0041 {
0042 return Point(thePnt.X() + theTol, thePnt.Y() + theTol, thePnt.Z() + theTol);
0043 }
0044
0045
0046 BRepBuilderAPI_VertexInspector(const double theTol)
0047 : myTol(theTol * theTol)
0048 {
0049 }
0050
0051
0052 void Add(const gp_XYZ& thePnt) { myPoints.Append(thePnt); }
0053
0054
0055 void ClearResList() { myResInd.Clear(); }
0056
0057
0058 void SetCurrent(const gp_XYZ& theCurPnt) { myCurrent = theCurPnt; }
0059
0060
0061 const NCollection_List<int>& ResInd() { return myResInd; }
0062
0063
0064 Standard_EXPORT NCollection_CellFilter_Action Inspect(const int theTarget);
0065
0066 private:
0067 double myTol;
0068 NCollection_List<int> myResInd;
0069 VectorOfPoint myPoints;
0070 gp_XYZ myCurrent;
0071 };
0072
0073 #endif