Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:46:41

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_FClass2dOfClassifier_HeaderFile
0018 #define _Geom2dHatch_FClass2dOfClassifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <gp_Lin2d.hxx>
0024 #include <TopTrans_CurveTransition.hxx>
0025 #include <Geom2dHatch_Intersector.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TopAbs_State.hxx>
0028 #include <TopAbs_Orientation.hxx>
0029 class Standard_DomainError;
0030 class Geom2dAdaptor_Curve;
0031 class Geom2dHatch_Intersector;
0032 class gp_Lin2d;
0033 
0034 
0035 
0036 class Geom2dHatch_FClass2dOfClassifier 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Creates an undefined classifier.
0044   Standard_EXPORT Geom2dHatch_FClass2dOfClassifier();
0045   
0046   //! Starts  a  classification process.   The  point to
0047   //! classify is the origin of  the  line <L>.  <P>  is
0048   //! the original length of the segment on <L>  used to
0049   //! compute  intersections.   <Tol> is the   tolerance
0050   //! attached to the line segment in intersections.
0051   Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
0052   
0053   //! Updates  the classification process with  the edge
0054   //! <E> from the boundary.
0055   Standard_EXPORT void Compare (const Geom2dAdaptor_Curve& E, const TopAbs_Orientation Or);
0056   
0057   //! Returns the current value of the parameter.
0058     Standard_Real Parameter() const;
0059   
0060   //! Returns the intersecting algorithm.
0061     Geom2dHatch_Intersector& Intersector();
0062   
0063   //! Returns  0  if  the   last  compared   edge had no
0064   //! relevant intersection.  Else returns  the index of
0065   //! this   intersection  in the    last   intersection
0066   //! algorithm.
0067     Standard_Integer ClosestIntersection() const;
0068   
0069   //! Returns the current state of the point.
0070     TopAbs_State State() const;
0071   
0072   //! Returns the Standard_True if the closest intersection point
0073   //! represents head or end of the edge. Returns Standard_False
0074   //! otherwise.
0075     Standard_Boolean IsHeadOrEnd() const;
0076 
0077 
0078 
0079 
0080 protected:
0081 
0082 
0083 
0084 
0085 
0086 private:
0087 
0088 
0089 
0090   Standard_Boolean myIsSet;
0091   Standard_Boolean myFirstCompare;
0092   Standard_Boolean myFirstTrans;
0093   gp_Lin2d myLin;
0094   Standard_Real myParam;
0095   Standard_Real myTolerance;
0096   TopTrans_CurveTransition myTrans;
0097   Geom2dHatch_Intersector myIntersector;
0098   Standard_Integer myClosest;
0099   TopAbs_State myState;
0100   Standard_Boolean myIsHeadOrEnd;
0101 
0102 
0103 };
0104 
0105 #define TheEdge Geom2dAdaptor_Curve
0106 #define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
0107 #define TheIntersector Geom2dHatch_Intersector
0108 #define TheIntersector_hxx <Geom2dHatch_Intersector.hxx>
0109 #define TopClass_Classifier2d Geom2dHatch_FClass2dOfClassifier
0110 #define TopClass_Classifier2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
0111 
0112 #include <TopClass_Classifier2d.lxx>
0113 
0114 #undef TheEdge
0115 #undef TheEdge_hxx
0116 #undef TheIntersector
0117 #undef TheIntersector_hxx
0118 #undef TopClass_Classifier2d
0119 #undef TopClass_Classifier2d_hxx
0120 
0121 
0122 
0123 
0124 #endif // _Geom2dHatch_FClass2dOfClassifier_HeaderFile