1 // Created on: 1992-11-19
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepClass_FaceExplorer_HeaderFile
18 #define _BRepClass_FaceExplorer_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopoDS_Face.hxx>
25 #include <TopExp_Explorer.hxx>
26 #include <Standard_Integer.hxx>
27 #include <Standard_Real.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <TopAbs_Orientation.hxx>
36 //! Provide an exploration of a BRep Face for the
37 //! classification. Return UV edges.
38 class BRepClass_FaceExplorer
45 Standard_EXPORT BRepClass_FaceExplorer(const TopoDS_Face& F);
47 //! Should return True if the point is outside a
48 //! bounding volume of the face.
49 Standard_EXPORT Standard_Boolean Reject (const gp_Pnt2d& P) const;
51 //! Returns in <L>, <Par> a segment having at least
52 //! one intersection with the face boundary to
53 //! compute intersections.
54 Standard_EXPORT Standard_Boolean Segment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
56 //! Returns in <L>, <Par> a segment having at least
57 //! one intersection with the face boundary to
58 //! compute intersections. Each call gives another segment.
59 Standard_EXPORT Standard_Boolean OtherSegment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
61 //! Starts an exploration of the wires.
62 Standard_EXPORT void InitWires();
64 //! Returns True if there is a current wire.
65 Standard_Boolean MoreWires() const;
67 //! Sets the explorer to the next wire.
70 //! Returns True if the wire bounding volume does not
71 //! intersect the segment.
72 Standard_EXPORT Standard_Boolean RejectWire (const gp_Lin2d& L, const Standard_Real Par) const;
74 //! Starts an exploration of the edges of the current
76 Standard_EXPORT void InitEdges();
78 //! Returns True if there is a current edge.
79 Standard_Boolean MoreEdges() const;
81 //! Sets the explorer to the next edge.
84 //! Returns True if the edge bounding volume does not
85 //! intersect the segment.
86 Standard_EXPORT Standard_Boolean RejectEdge (const gp_Lin2d& L, const Standard_Real Par) const;
88 //! Current edge in current wire and its orientation.
89 Standard_EXPORT void CurrentEdge (BRepClass_Edge& E, TopAbs_Orientation& Or) const;
105 TopExp_Explorer myWExplorer;
106 TopExp_Explorer myEExplorer;
107 Standard_Integer myCurEdgeInd;
108 Standard_Real myCurEdgePar;
114 #include <BRepClass_FaceExplorer.lxx>
120 #endif // _BRepClass_FaceExplorer_HeaderFile