1 // Created on: 1993-06-17
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopOpeBRepBuild_PaveClassifier_HeaderFile
18 #define _TopOpeBRepBuild_PaveClassifier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopoDS_Edge.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopAbs_Orientation.hxx>
28 #include <Standard_Integer.hxx>
29 #include <TopOpeBRepBuild_LoopClassifier.hxx>
30 #include <TopAbs_State.hxx>
32 class TopOpeBRepBuild_Loop;
36 //! This class compares vertices on an edge.
38 //! A vertex V1 is inside a vertex V2 if V1 is on the
39 //! part of the curve defined by V2.
41 //! If V2 is FORWARD V1 must be after V2 on the curve.
42 //! If V2 is REVERSED V1 must be before V2 on the curve.
43 //! If V2 is INTERNAL V1 is always inside.
44 //! If V2 is EXTERNAL V1 is never inside.
45 class TopOpeBRepBuild_PaveClassifier : public TopOpeBRepBuild_LoopClassifier
52 //! Create a Pave classifier to compare vertices on edge <E>.
53 Standard_EXPORT TopOpeBRepBuild_PaveClassifier(const TopoDS_Shape& E);
55 //! Returns state of vertex <L1> compared with <L2>.
56 Standard_EXPORT TopAbs_State Compare (const Handle(TopOpeBRepBuild_Loop)& L1, const Handle(TopOpeBRepBuild_Loop)& L2);
58 Standard_EXPORT void SetFirstParameter (const Standard_Real P);
60 Standard_EXPORT void ClosedVertices (const Standard_Boolean B);
62 Standard_EXPORT static Standard_Real AdjustCase (const Standard_Real p1, const TopAbs_Orientation o, const Standard_Real first, const Standard_Real period, const Standard_Real tol, Standard_Integer& cas);
76 Standard_EXPORT TopAbs_State CompareOnNonPeriodic();
78 Standard_EXPORT TopAbs_State CompareOnPeriodic();
80 Standard_EXPORT void AdjustOnPeriodic();
82 Standard_EXPORT Standard_Boolean ToAdjustOnPeriodic() const;
86 Standard_Boolean myEdgePeriodic;
87 Standard_Real myFirst;
88 Standard_Real myPeriod;
89 Standard_Boolean mySameParameters;
90 Standard_Boolean myClosedVertices;
93 TopAbs_Orientation myO1;
94 TopAbs_Orientation myO2;
95 Standard_Integer myCas1;
96 Standard_Integer myCas2;
107 #endif // _TopOpeBRepBuild_PaveClassifier_HeaderFile