Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:16:33

0001 // Copyright (c) 1994-1999 Matra Datavision
0002 // Copyright (c) 1999-2024 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BRepClass3d_SolidPassiveClassifier_HeaderFile
0016 #define _BRepClass3d_SolidPassiveClassifier_HeaderFile
0017 
0018 #include <BRepClass3d_Intersector3d.hxx>
0019 #include <Standard.hxx>
0020 #include <Standard_Boolean.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 #include <TopAbs_Orientation.hxx>
0024 #include <TopAbs_State.hxx>
0025 #include <TopoDS_Face.hxx>
0026 #include <gp_Lin.hxx>
0027 
0028 class Standard_DomainError;
0029 class BRepClass3d_Intersector3d;
0030 class gp_Lin;
0031 class TopoDS_Face;
0032 
0033 class BRepClass3d_SolidPassiveClassifier
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Creates an undefined classifier.
0039   Standard_EXPORT BRepClass3d_SolidPassiveClassifier();
0040 
0041   //! Starts a classification process. The point to
0042   //! classify is the origin of the line <L>. <P> is
0043   //! the original length of the segment on <L> used to
0044   //! compute intersections. <Tol> is the tolerance
0045   //! attached to the intersections.
0046   Standard_EXPORT void Reset(const gp_Lin& L, const double P, const double Tol);
0047 
0048   //! Updates the classification process with the face
0049   //! <F> from the boundary.
0050   Standard_EXPORT void Compare(const TopoDS_Face& F, const TopAbs_Orientation Or);
0051 
0052   //! Returns the current value of the parameter.
0053   double Parameter() const { return myParam; }
0054 
0055   //! Returns True if an intersection is computed.
0056   bool HasIntersection() const { return hasIntersect; }
0057 
0058   //! Returns the intersecting algorithm.
0059   BRepClass3d_Intersector3d& Intersector() { return myIntersector; }
0060 
0061   //! Returns the current state of the point.
0062   TopAbs_State State() const { return myState; }
0063 
0064 private:
0065   bool                      isSet;
0066   TopoDS_Face               myFace;
0067   gp_Lin                    myLin;
0068   double                    myParam;
0069   double                    myTolerance;
0070   TopAbs_State              myState;
0071   bool                      hasIntersect;
0072   BRepClass3d_Intersector3d myIntersector;
0073 };
0074 
0075 #endif // _BRepClass3d_SolidPassiveClassifier_HeaderFile