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
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 _IntTools_FClass2d_HeaderFile
18 #define _IntTools_FClass2d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepTopAdaptor_SeqOfPtr.hxx>
25 #include <TColStd_SequenceOfInteger.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopoDS_Face.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <TopAbs_State.hxx>
34 //! Class provides an algorithm to classify a 2d Point
35 //! in 2d space of face using boundaries of the face.
36 class IntTools_FClass2d
45 Standard_EXPORT IntTools_FClass2d();
48 //! Initializes algorithm by the face F
50 Standard_EXPORT IntTools_FClass2d(const TopoDS_Face& F, const Standard_Real Tol);
53 //! Initializes algorithm by the face F
55 Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Real Tol);
58 //! Returns state of infinite 2d point relatively to (0, 0)
59 Standard_EXPORT TopAbs_State PerformInfinitePoint() const;
62 //! Returns state of the 2d point Puv.
63 //! If RecadreOnPeriodic is true (defalut value),
64 //! for the periodic surface 2d point, adjusted to period, is
66 Standard_EXPORT TopAbs_State Perform (const gp_Pnt2d& Puv, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
70 Standard_EXPORT void Destroy();
77 //! Test a point with +- an offset (Tol) and returns
78 //! On if some points are OUT an some are IN
79 //! (Caution: Internal use . see the code for more details)
80 Standard_EXPORT TopAbs_State TestOnRestriction (const gp_Pnt2d& Puv, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
82 Standard_EXPORT Standard_Boolean IsHole() const;
97 BRepTopAdaptor_SeqOfPtr TabClass;
98 TColStd_SequenceOfInteger TabOrien;
109 Standard_Boolean myIsHole;
120 #endif // _IntTools_FClass2d_HeaderFile