1 // Created on: 1994-02-03
2 // Created by: Jean Marc LACHAUME
3 // Copyright (c) 1994-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 _Geom2dHatch_Classifier_HeaderFile
18 #define _Geom2dHatch_Classifier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Geom2dHatch_FClass2dOfClassifier.hxx>
25 #include <Geom2dAdaptor_Curve.hxx>
26 #include <Standard_Real.hxx>
27 #include <IntRes2d_Position.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <TopAbs_State.hxx>
30 class Standard_DomainError;
31 class Geom2dHatch_Elements;
32 class Geom2dAdaptor_Curve;
33 class Geom2dHatch_Intersector;
34 class Geom2dHatch_FClass2dOfClassifier;
39 class Geom2dHatch_Classifier
46 //! Empty constructor, undefined algorithm.
47 Standard_EXPORT Geom2dHatch_Classifier();
49 //! Creates an algorithm to classify the Point P with
50 //! Tolerance <T> on the face described by <F>.
51 Standard_EXPORT Geom2dHatch_Classifier(Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
53 //! Classify the Point P with Tolerance <T> on the
54 //! face described by <F>.
55 Standard_EXPORT void Perform (Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
57 //! Returns the result of the classification.
58 Standard_EXPORT TopAbs_State State() const;
60 //! Returns True when the state was computed by a
61 //! rejection. The state is OUT.
62 Standard_Boolean Rejected() const;
64 //! Returns True if the face contains no wire. The
66 Standard_Boolean NoWires() const;
68 //! Returns the Edge used to determine the
69 //! classification. When the State is ON this is the
70 //! Edge containing the point.
71 Standard_EXPORT const Geom2dAdaptor_Curve& Edge() const;
73 //! Returns the parameter on Edge() used to determine the
75 Standard_EXPORT Standard_Real EdgeParameter() const;
77 //! Returns the position of the point on the edge
79 IntRes2d_Position Position() const;
88 Geom2dHatch_FClass2dOfClassifier myClassifier;
89 Geom2dAdaptor_Curve myEdge;
90 Standard_Real myEdgeParameter;
91 IntRes2d_Position myPosition;
92 Standard_Boolean rejected;
93 Standard_Boolean nowires;
104 #define TheFaceExplorer Geom2dHatch_Elements
105 #define TheFaceExplorer_hxx <Geom2dHatch_Elements.hxx>
106 #define TheEdge Geom2dAdaptor_Curve
107 #define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
108 #define TheIntersection2d Geom2dHatch_Intersector
109 #define TheIntersection2d_hxx <Geom2dHatch_Intersector.hxx>
110 #define TopClass_FClass2d Geom2dHatch_FClass2dOfClassifier
111 #define TopClass_FClass2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
112 #define TopClass_FaceClassifier Geom2dHatch_Classifier
113 #define TopClass_FaceClassifier_hxx <Geom2dHatch_Classifier.hxx>
115 #include <TopClass_FaceClassifier.lxx>
117 #undef TheFaceExplorer
118 #undef TheFaceExplorer_hxx
121 #undef TheIntersection2d
122 #undef TheIntersection2d_hxx
123 #undef TopClass_FClass2d
124 #undef TopClass_FClass2d_hxx
125 #undef TopClass_FaceClassifier
126 #undef TopClass_FaceClassifier_hxx
131 #endif // _Geom2dHatch_Classifier_HeaderFile