Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:46:00

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_FClass2dOfFClassifier_HeaderFile
0018 #define _BRepClass_FClass2dOfFClassifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopTrans_CurveTransition.hxx>
0024 #include <BRepClass_Intersector.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TopAbs_State.hxx>
0027 #include <TopAbs_Orientation.hxx>
0028 class Standard_DomainError;
0029 class BRepClass_Edge;
0030 class BRepClass_Intersector;
0031 class gp_Lin2d;
0032 
0033 class BRepClass_FClass2dOfFClassifier
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Creates an undefined classifier.
0039   Standard_EXPORT BRepClass_FClass2dOfFClassifier();
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 line segment in intersections.
0046   Standard_EXPORT void Reset(const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
0047 
0048   //! Updates  the classification process with  the edge
0049   //! <E> from the boundary.
0050   Standard_EXPORT void Compare(const BRepClass_Edge& E, const TopAbs_Orientation Or);
0051 
0052   //! Returns the current value of the parameter.
0053   Standard_Real Parameter() const;
0054 
0055   //! Returns the intersecting algorithm.
0056   BRepClass_Intersector& Intersector();
0057 
0058   //! Returns  0  if  the   last  compared   edge had no
0059   //! relevant intersection.  Else returns  the index of
0060   //! this   intersection  in the    last   intersection
0061   //! algorithm.
0062   Standard_Integer ClosestIntersection() const;
0063 
0064   //! Returns the current state of the point.
0065   TopAbs_State State() const;
0066 
0067   //! Returns the Standard_True if the closest intersection point
0068   //! represents head or end of the edge. Returns Standard_False
0069   //! otherwise.
0070   Standard_Boolean IsHeadOrEnd() const;
0071 
0072 protected:
0073 private:
0074   Standard_Boolean         myIsSet;
0075   Standard_Boolean         myFirstCompare;
0076   Standard_Boolean         myFirstTrans;
0077   gp_Lin2d                 myLin;
0078   Standard_Real            myParam;
0079   Standard_Real            myTolerance;
0080   TopTrans_CurveTransition myTrans;
0081   BRepClass_Intersector    myIntersector;
0082   Standard_Integer         myClosest;
0083   TopAbs_State             myState;
0084   Standard_Boolean         myIsHeadOrEnd;
0085 };
0086 
0087 #define TheEdge BRepClass_Edge
0088 #define TheEdge_hxx <BRepClass_Edge.hxx>
0089 #define TheIntersector BRepClass_Intersector
0090 #define TheIntersector_hxx <BRepClass_Intersector.hxx>
0091 #define TopClass_Classifier2d BRepClass_FClass2dOfFClassifier
0092 #define TopClass_Classifier2d_hxx <BRepClass_FClass2dOfFClassifier.hxx>
0093 
0094 #include <TopClass_Classifier2d.lxx>
0095 
0096 #undef TheEdge
0097 #undef TheEdge_hxx
0098 #undef TheIntersector
0099 #undef TheIntersector_hxx
0100 #undef TopClass_Classifier2d
0101 #undef TopClass_Classifier2d_hxx
0102 
0103 #endif // _BRepClass_FClass2dOfFClassifier_HeaderFile