Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:34

0001 // Created on: 1994-02-03
0002 // Created by: Jean Marc LACHAUME
0003 // Copyright (c) 1994-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 _Geom2dHatch_Classifier_HeaderFile
0018 #define _Geom2dHatch_Classifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Geom2dHatch_FClass2dOfClassifier.hxx>
0024 #include <Geom2dAdaptor_Curve.hxx>
0025 #include <IntRes2d_Position.hxx>
0026 #include <TopAbs_State.hxx>
0027 class Standard_DomainError;
0028 class Geom2dHatch_Elements;
0029 class Geom2dAdaptor_Curve;
0030 class Geom2dHatch_Intersector;
0031 class Geom2dHatch_FClass2dOfClassifier;
0032 class gp_Pnt2d;
0033 
0034 
0035 
0036 class Geom2dHatch_Classifier 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Empty constructor, undefined algorithm.
0044   Standard_EXPORT Geom2dHatch_Classifier();
0045   
0046   //! Creates an algorithm to classify the Point  P with
0047   //! Tolerance <T> on the face described by <F>.
0048   Standard_EXPORT Geom2dHatch_Classifier(Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
0049   
0050   //! Classify  the Point  P  with  Tolerance <T> on the
0051   //! face described by <F>.
0052   Standard_EXPORT void Perform (Geom2dHatch_Elements& F, const gp_Pnt2d& P, 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 Geom2dAdaptor_Curve& 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 
0079 
0080 
0081 protected:
0082 
0083 
0084 
0085   Geom2dHatch_FClass2dOfClassifier myClassifier;
0086   Geom2dAdaptor_Curve myEdge;
0087   Standard_Real myEdgeParameter;
0088   IntRes2d_Position myPosition;
0089   Standard_Boolean rejected;
0090   Standard_Boolean nowires;
0091 
0092 
0093 private:
0094 
0095 
0096 
0097 
0098 
0099 };
0100 
0101 #define TheFaceExplorer Geom2dHatch_Elements
0102 #define TheFaceExplorer_hxx <Geom2dHatch_Elements.hxx>
0103 #define TheEdge Geom2dAdaptor_Curve
0104 #define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
0105 #define TheIntersection2d Geom2dHatch_Intersector
0106 #define TheIntersection2d_hxx <Geom2dHatch_Intersector.hxx>
0107 #define TopClass_FClass2d Geom2dHatch_FClass2dOfClassifier
0108 #define TopClass_FClass2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
0109 #define TopClass_FaceClassifier Geom2dHatch_Classifier
0110 #define TopClass_FaceClassifier_hxx <Geom2dHatch_Classifier.hxx>
0111 
0112 #include <TopClass_FaceClassifier.lxx>
0113 
0114 #undef TheFaceExplorer
0115 #undef TheFaceExplorer_hxx
0116 #undef TheEdge
0117 #undef TheEdge_hxx
0118 #undef TheIntersection2d
0119 #undef TheIntersection2d_hxx
0120 #undef TopClass_FClass2d
0121 #undef TopClass_FClass2d_hxx
0122 #undef TopClass_FaceClassifier
0123 #undef TopClass_FaceClassifier_hxx
0124 
0125 
0126 
0127 
0128 #endif // _Geom2dHatch_Classifier_HeaderFile