Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:16:07

0001 // Created on: 1992-11-18
0002 // Created by: Remi LEQUETTE
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepClass_FClassifier_HeaderFile
0018 #define _BRepClass_FClassifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <BRepClass_FClass2dOfFClassifier.hxx>
0024 #include <BRepClass_Edge.hxx>
0025 #include <IntRes2d_Position.hxx>
0026 #include <TopAbs_State.hxx>
0027 class Standard_DomainError;
0028 class BRepClass_FaceExplorer;
0029 class BRepClass_Edge;
0030 class BRepClass_Intersector;
0031 class BRepClass_FClass2dOfFClassifier;
0032 class gp_Pnt2d;
0033 
0034 class BRepClass_FClassifier
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   //! Empty constructor, undefined algorithm.
0040   Standard_EXPORT BRepClass_FClassifier();
0041 
0042   //! Creates an algorithm to classify the Point  P with
0043   //! Tolerance <T> on the face described by <F>.
0044   Standard_EXPORT BRepClass_FClassifier(BRepClass_FaceExplorer& F,
0045                                         const gp_Pnt2d&         P,
0046                                         const Standard_Real     Tol);
0047 
0048   //! Classify  the Point  P  with  Tolerance <T> on the
0049   //! face described by <F>.
0050   Standard_EXPORT void Perform(BRepClass_FaceExplorer& F,
0051                                const gp_Pnt2d&         P,
0052                                const Standard_Real     Tol);
0053 
0054   //! Returns the result of the classification.
0055   Standard_EXPORT TopAbs_State State() const;
0056 
0057   //! Returns  True when  the   state was computed by  a
0058   //! rejection. The state is OUT.
0059   Standard_Boolean Rejected() const;
0060 
0061   //! Returns True if  the face  contains  no wire.  The
0062   //! state is IN.
0063   Standard_Boolean NoWires() const;
0064 
0065   //! Returns   the    Edge  used   to    determine  the
0066   //! classification. When the State is ON  this  is the
0067   //! Edge containing the point.
0068   Standard_EXPORT const BRepClass_Edge& Edge() const;
0069 
0070   //! Returns the parameter on Edge() used to determine  the
0071   //! classification.
0072   Standard_EXPORT Standard_Real EdgeParameter() const;
0073 
0074   //! Returns the  position of  the   point on the  edge
0075   //! returned by Edge.
0076   IntRes2d_Position Position() const;
0077 
0078 protected:
0079   BRepClass_FClass2dOfFClassifier myClassifier;
0080   BRepClass_Edge                  myEdge;
0081   Standard_Real                   myEdgeParameter;
0082   IntRes2d_Position               myPosition;
0083   Standard_Boolean                rejected;
0084   Standard_Boolean                nowires;
0085 
0086 private:
0087 };
0088 
0089 #define TheFaceExplorer BRepClass_FaceExplorer
0090 #define TheFaceExplorer_hxx <BRepClass_FaceExplorer.hxx>
0091 #define TheEdge BRepClass_Edge
0092 #define TheEdge_hxx <BRepClass_Edge.hxx>
0093 #define TheIntersection2d BRepClass_Intersector
0094 #define TheIntersection2d_hxx <BRepClass_Intersector.hxx>
0095 #define TopClass_FClass2d BRepClass_FClass2dOfFClassifier
0096 #define TopClass_FClass2d_hxx <BRepClass_FClass2dOfFClassifier.hxx>
0097 #define TopClass_FaceClassifier BRepClass_FClassifier
0098 #define TopClass_FaceClassifier_hxx <BRepClass_FClassifier.hxx>
0099 
0100 #include <TopClass_FaceClassifier.lxx>
0101 
0102 #undef TheFaceExplorer
0103 #undef TheFaceExplorer_hxx
0104 #undef TheEdge
0105 #undef TheEdge_hxx
0106 #undef TheIntersection2d
0107 #undef TheIntersection2d_hxx
0108 #undef TopClass_FClass2d
0109 #undef TopClass_FClass2d_hxx
0110 #undef TopClass_FaceClassifier
0111 #undef TopClass_FaceClassifier_hxx
0112 
0113 #endif // _BRepClass_FClassifier_HeaderFile