0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / Intf / Intf_Polygon2d.hxx
1 // Created on: 2012-02-10
2 // Created by: Serey ZERCHANINOV
3 // Copyright (c) 2012-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _Intf_Polygon2d_HeaderFile
17 #define _Intf_Polygon2d_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
22
23 #include <Bnd_Box2d.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Integer.hxx>
27 class Standard_OutOfRange;
28 class Bnd_Box2d;
29 class gp_Pnt2d;
30
31
32 //! Describes the necessary polygon information to compute
33 //! the interferences.
34 class Intf_Polygon2d 
35 {
36 public:
37
38   DEFINE_STANDARD_ALLOC
39
40   
41   //! Returns the bounding box of the polygon.
42     const Bnd_Box2d& Bounding() const;
43   
44   //! Returns True if the polyline is closed.
45   Standard_EXPORT virtual Standard_Boolean Closed() const;
46   virtual ~Intf_Polygon2d() {}
47   
48   //! Returns the tolerance of the polygon.
49   Standard_EXPORT virtual Standard_Real DeflectionOverEstimation() const = 0;
50   
51   //! Returns the number of Segments in the polyline.
52   Standard_EXPORT virtual Standard_Integer NbSegments() const = 0;
53   
54   //! Returns the points of the segment <Index> in the Polygon.
55   Standard_EXPORT virtual void Segment (const Standard_Integer theIndex, gp_Pnt2d& theBegin, gp_Pnt2d& theEnd) const = 0;
56
57
58
59
60 protected:
61
62
63
64   Bnd_Box2d myBox;
65
66
67 private:
68
69
70
71
72
73 };
74
75
76 #include <Intf_Polygon2d.lxx>
77
78
79
80
81
82 #endif // _Intf_Polygon2d_HeaderFile