1 // Created on: 1995-03-22
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 #ifndef _BRepTopAdaptor_FClass2d_HeaderFile
18 #define _BRepTopAdaptor_FClass2d_HeaderFile
19 
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23 
24 #include <BRepTopAdaptor_SeqOfPtr.hxx>
25 #include <TColStd_SequenceOfInteger.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopoDS_Face.hxx>
28 #include <TopAbs_State.hxx>
29 #include <Standard_Boolean.hxx>
30 class gp_Pnt2d;
31 
32 
33 
34 class BRepTopAdaptor_FClass2d
35 {
36 public:
37 
38   DEFINE_STANDARD_ALLOC
39 
40 
41   Standard_EXPORT BRepTopAdaptor_FClass2d(const TopoDS_Face& F, const Standard_Real Tol);
42 
43   Standard_EXPORT TopAbs_State PerformInfinitePoint() const;
44 
45   Standard_EXPORT TopAbs_State Perform (const gp_Pnt2d& Puv, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
46 
47   Standard_EXPORT void Destroy();
~BRepTopAdaptor_FClass2d()48 ~BRepTopAdaptor_FClass2d()
49 {
50   Destroy();
51 }
52 
53   Standard_EXPORT const BRepTopAdaptor_FClass2d& Copy (const BRepTopAdaptor_FClass2d& Other) const;
operator =(const BRepTopAdaptor_FClass2d & Other) const54 const BRepTopAdaptor_FClass2d& operator= (const BRepTopAdaptor_FClass2d& Other) const
55 {
56   return Copy(Other);
57 }
58 
59   //! Test a point with +- an offset (Tol) and returns
60   //! On if some points are OUT an some are IN
61   //! (Caution: Internal use . see the code for more details)
62   Standard_EXPORT TopAbs_State TestOnRestriction (const gp_Pnt2d& Puv, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
63 
64 
65 
66 
67 protected:
68 
69 
70 
71 
72 
73 private:
74 
75 
76 
77   BRepTopAdaptor_SeqOfPtr TabClass;
78   TColStd_SequenceOfInteger TabOrien;
79   Standard_Real Toluv;
80   TopoDS_Face Face;
81   Standard_Real U1;
82   Standard_Real V1;
83   Standard_Real U2;
84   Standard_Real V2;
85   Standard_Real Umin;
86   Standard_Real Umax;
87   Standard_Real Vmin;
88   Standard_Real Vmax;
89 
90 
91 };
92 
93 
94 
95 
96 
97 
98 
99 #endif // _BRepTopAdaptor_FClass2d_HeaderFile
100