File indexing completed on 2026-09-28 09:19:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepClass_FaceExplorer_HeaderFile
0018 #define _BRepClass_FaceExplorer_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <TopoDS_Shape.hxx>
0023 #include <NCollection_List.hxx>
0024 #include <TopTools_ShapeMapHasher.hxx>
0025 #include <NCollection_IndexedDataMap.hxx>
0026
0027 #include <TopAbs_Orientation.hxx>
0028 #include <TopoDS_Face.hxx>
0029 #include <TopExp_Explorer.hxx>
0030 #include <Standard_Integer.hxx>
0031 class gp_Pnt2d;
0032 class gp_Lin2d;
0033 class BRepClass_Edge;
0034
0035
0036
0037 class BRepClass_FaceExplorer
0038 {
0039 public:
0040 DEFINE_STANDARD_ALLOC
0041
0042 Standard_EXPORT BRepClass_FaceExplorer(const TopoDS_Face& F);
0043
0044
0045
0046
0047
0048 Standard_EXPORT bool CheckPoint(gp_Pnt2d& thePoint);
0049
0050
0051
0052 Standard_EXPORT bool Reject(const gp_Pnt2d& P) const;
0053
0054
0055
0056
0057 Standard_EXPORT bool Segment(const gp_Pnt2d& P, gp_Lin2d& L, double& Par);
0058
0059
0060
0061
0062 Standard_EXPORT bool OtherSegment(const gp_Pnt2d& P, gp_Lin2d& L, double& Par);
0063
0064
0065 Standard_EXPORT void InitWires();
0066
0067
0068 bool MoreWires() const { return myWExplorer.More(); }
0069
0070
0071 void NextWire() { myWExplorer.Next(); }
0072
0073
0074
0075 Standard_EXPORT bool RejectWire(const gp_Lin2d& L, const double Par) const;
0076
0077
0078
0079 Standard_EXPORT void InitEdges();
0080
0081
0082 bool MoreEdges() const { return myEExplorer.More(); }
0083
0084
0085 void NextEdge() { myEExplorer.Next(); }
0086
0087
0088
0089 Standard_EXPORT bool RejectEdge(const gp_Lin2d& L, const double Par) const;
0090
0091
0092 Standard_EXPORT void CurrentEdge(BRepClass_Edge& E, TopAbs_Orientation& Or) const;
0093
0094
0095 double MaxTolerance() const { return myMaxTolerance; }
0096
0097
0098
0099 void SetMaxTolerance(const double theValue) { myMaxTolerance = theValue; }
0100
0101
0102
0103 bool UseBndBox() const { return myUseBndBox; }
0104
0105
0106
0107 void SetUseBndBox(const bool theValue) { myUseBndBox = theValue; }
0108
0109 protected:
0110
0111 Standard_EXPORT void ComputeFaceBounds();
0112
0113 private:
0114 TopoDS_Face myFace;
0115 TopExp_Explorer myWExplorer;
0116 TopExp_Explorer myEExplorer;
0117 int myCurEdgeInd;
0118 double myCurEdgePar;
0119 double myMaxTolerance;
0120 bool myUseBndBox;
0121 NCollection_IndexedDataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0122 myMapVE;
0123
0124 double myUMin;
0125 double myUMax;
0126 double myVMin;
0127 double myVMax;
0128 };
0129
0130 #endif