1 // Created on: 1992-11-18
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_FacePassiveClassifier_HeaderFile
18 #define _BRepClass_FacePassiveClassifier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <gp_Lin2d.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopTrans_CurveTransition.hxx>
28 #include <BRepClass_Intersector.hxx>
29 #include <Standard_Integer.hxx>
30 #include <TopAbs_State.hxx>
31 #include <TopAbs_Orientation.hxx>
32 class Standard_DomainError;
34 class BRepClass_Intersector;
39 class BRepClass_FacePassiveClassifier
46 //! Creates an undefined classifier.
47 Standard_EXPORT BRepClass_FacePassiveClassifier();
49 //! Starts a classification process. The point to
50 //! classify is the origin of the line <L>. <P> is
51 //! the original length of the segment on <L> used to
52 //! compute intersections. <Tol> is the tolerance
53 //! attached to the line segment in intersections.
54 Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
56 //! Updates the classification process with the edge
57 //! <E> from the boundary.
58 Standard_EXPORT void Compare (const BRepClass_Edge& E, const TopAbs_Orientation Or);
60 //! Returns the current value of the parameter.
61 Standard_Real Parameter() const;
63 //! Returns the intersecting algorithm.
64 BRepClass_Intersector& Intersector();
66 //! Returns 0 if the last compared edge had no
67 //! relevant intersection. Else returns the index of
68 //! this intersection in the last intersection
70 Standard_Integer ClosestIntersection() const;
72 //! Returns the current state of the point.
73 TopAbs_State State() const;
75 //! Returns the Standard_True if the closest intersection point
76 //! represents head or end of the edge. Returns Standard_False
78 Standard_Boolean IsHeadOrEnd() const;
93 Standard_Boolean myIsSet;
94 Standard_Boolean myFirstCompare;
95 Standard_Boolean myFirstTrans;
97 Standard_Real myParam;
98 Standard_Real myTolerance;
99 TopTrans_CurveTransition myTrans;
100 BRepClass_Intersector myIntersector;
101 Standard_Integer myClosest;
102 TopAbs_State myState;
103 Standard_Boolean myIsHeadOrEnd;
108 #define TheEdge BRepClass_Edge
109 #define TheEdge_hxx <BRepClass_Edge.hxx>
110 #define TheIntersector BRepClass_Intersector
111 #define TheIntersector_hxx <BRepClass_Intersector.hxx>
112 #define TopClass_Classifier2d BRepClass_FacePassiveClassifier
113 #define TopClass_Classifier2d_hxx <BRepClass_FacePassiveClassifier.hxx>
115 #include <TopClass_Classifier2d.lxx>
119 #undef TheIntersector
120 #undef TheIntersector_hxx
121 #undef TopClass_Classifier2d
122 #undef TopClass_Classifier2d_hxx
127 #endif // _BRepClass_FacePassiveClassifier_HeaderFile