0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / IntCurveSurface / IntCurveSurface_ThePolygonOfHInter.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-04-07
2// Created by: Laurent BUCHARD
3// Copyright (c) 1993-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 _IntCurveSurface_ThePolygonOfHInter_HeaderFile
18#define _IntCurveSurface_ThePolygonOfHInter_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Bnd_Box.hxx>
25#include <Standard_Real.hxx>
26#include <Standard_Integer.hxx>
27#include <TColgp_Array1OfPnt.hxx>
28#include <Standard_Boolean.hxx>
29#include <TColStd_HArray1OfReal.hxx>
30#include <TColStd_Array1OfReal.hxx>
31class Standard_OutOfRange;
32class Adaptor3d_HCurve;
33class IntCurveSurface_TheHCurveTool;
34class Bnd_Box;
35class gp_Pnt;
36
37
38
39class IntCurveSurface_ThePolygonOfHInter
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
46 Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Integer NbPnt);
47
48 Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real U1, const Standard_Real U2, const Standard_Integer NbPnt);
49
50 Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const TColStd_Array1OfReal& Upars);
51
36b9ff75 52 //! Give the bounding box of the polygon.
42cf5bc1 53 const Bnd_Box& Bounding() const;
54
55 Standard_Real DeflectionOverEstimation() const;
56
57 void SetDeflectionOverEstimation (const Standard_Real x);
58
59 void Closed (const Standard_Boolean clos);
60
61 Standard_Boolean Closed() const;
62
36b9ff75 63 //! Give the number of Segments in the polyline.
42cf5bc1 64 Standard_Integer NbSegments() const;
65
36b9ff75 66 //! Give the point of range Index in the Polygon.
42cf5bc1 67 const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const;
68
36b9ff75 69 //! Give the point of range Index in the Polygon.
42cf5bc1 70 const gp_Pnt& EndOfSeg (const Standard_Integer Index) const;
71
36b9ff75 72 //! Returns the parameter (On the curve)
73 //! of the first point of the Polygon
42cf5bc1 74 Standard_Real InfParameter() const;
75
36b9ff75 76 //! Returns the parameter (On the curve)
77 //! of the last point of the Polygon
42cf5bc1 78 Standard_Real SupParameter() const;
79
36b9ff75 80 //! Give an approximation of the parameter on the curve
81 //! according to the discretization of the Curve.
42cf5bc1 82 Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
83
84 Standard_EXPORT void Dump() const;
85
86
87
88
89protected:
90
91
92 Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)& Curve);
93
94 Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)& Curve, const TColStd_Array1OfReal& Upars);
95
96
97
98
99private:
100
101
102
103 Bnd_Box TheBnd;
104 Standard_Real TheDeflection;
105 Standard_Integer NbPntIn;
106 TColgp_Array1OfPnt ThePnts;
107 Standard_Boolean ClosedPolygon;
108 Standard_Real Binf;
109 Standard_Real Bsup;
110 Handle(TColStd_HArray1OfReal) myParams;
111
112
113};
114
115#define TheCurve Handle(Adaptor3d_HCurve)
116#define TheCurve_hxx <Adaptor3d_HCurve.hxx>
117#define TheCurveTool IntCurveSurface_TheHCurveTool
118#define TheCurveTool_hxx <IntCurveSurface_TheHCurveTool.hxx>
119#define IntCurveSurface_Polygon IntCurveSurface_ThePolygonOfHInter
120#define IntCurveSurface_Polygon_hxx <IntCurveSurface_ThePolygonOfHInter.hxx>
121
122#include <IntCurveSurface_Polygon.lxx>
123
124#undef TheCurve
125#undef TheCurve_hxx
126#undef TheCurveTool
127#undef TheCurveTool_hxx
128#undef IntCurveSurface_Polygon
129#undef IntCurveSurface_Polygon_hxx
130
131
132
133
134#endif // _IntCurveSurface_ThePolygonOfHInter_HeaderFile