Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1996-07-15
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1996-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 _BRepClass3d_SClassifier_HeaderFile
0018 #define _BRepClass3d_SClassifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopoDS_Face.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <TopAbs_State.hxx>
0026 class BRepClass3d_SolidExplorer;
0027 class gp_Pnt;
0028 
0029 
0030 //! Provides an algorithm to classify a point in a solid.
0031 class BRepClass3d_SClassifier 
0032 {
0033 public:
0034 
0035   DEFINE_STANDARD_ALLOC
0036 
0037   
0038   //! Empty constructor.
0039   Standard_EXPORT BRepClass3d_SClassifier();
0040   
0041   //! Constructor to classify the point P with the
0042   //! tolerance Tol on the solid S.
0043   Standard_EXPORT BRepClass3d_SClassifier(BRepClass3d_SolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol);
0044   
0045   //! Classify the point P with the
0046   //! tolerance Tol on the solid S.
0047   Standard_EXPORT void Perform (BRepClass3d_SolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol);
0048   
0049   //! Classify an infinite point with the
0050   //! tolerance Tol on the solid S.
0051   Standard_EXPORT void PerformInfinitePoint (BRepClass3d_SolidExplorer& S, const Standard_Real Tol);
0052   
0053   //! Returns True if the classification has been
0054   //! computed by rejection.
0055   //! The State is then OUT.
0056   Standard_EXPORT Standard_Boolean Rejected() const;
0057   
0058   //! Returns the result of the classification.
0059   Standard_EXPORT TopAbs_State State() const;
0060   
0061   //! Returns True when the point is a point of a face.
0062   Standard_EXPORT Standard_Boolean IsOnAFace() const;
0063   
0064   //! Returns the face used to determine the
0065   //! classification. When the state is ON, this is the
0066   //! face containing the point.
0067   //!
0068   //! When Rejected() returns True, Face() has no signification.
0069   Standard_EXPORT TopoDS_Face Face() const;
0070 
0071 
0072 
0073 
0074 protected:
0075 
0076   
0077   Standard_EXPORT void ForceIn();
0078   
0079   Standard_EXPORT void ForceOut();
0080 
0081 
0082 
0083 
0084 private:
0085 
0086 
0087 
0088   TopoDS_Face myFace;
0089 
0090   //! This variable stores information about algorithm internal state.
0091   //! Type of this variable differs from TopAbs_State since it contains 
0092   //! additional information about error status.
0093   //! 1 - Error inside of the algorithm.
0094   //! 2 - ON.
0095   //! 3 - IN.
0096   //! 4 - OUT.
0097   Standard_Integer myState;
0098 
0099 
0100 };
0101 
0102 
0103 
0104 
0105 
0106 
0107 
0108 #endif // _BRepClass3d_SClassifier_HeaderFile