1 // Created on: 1992-10-14
2 // Created by: Christophe MARION
3 // Copyright (c) 1992-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 _HLRBRep_ThePolygonOfInterCSurf_HeaderFile
18 #define _HLRBRep_ThePolygonOfInterCSurf_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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>
31 class Standard_OutOfRange;
33 class HLRBRep_LineTool;
39 class HLRBRep_ThePolygonOfInterCSurf
46 Standard_EXPORT HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve, const Standard_Integer NbPnt);
48 Standard_EXPORT HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve, const Standard_Real U1, const Standard_Real U2, const Standard_Integer NbPnt);
50 Standard_EXPORT HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve, const TColStd_Array1OfReal& Upars);
52 //! Give the bounding box of the polygon.
53 const Bnd_Box& Bounding() const;
55 Standard_Real DeflectionOverEstimation() const;
57 void SetDeflectionOverEstimation (const Standard_Real x);
59 void Closed (const Standard_Boolean clos);
61 Standard_Boolean Closed() const;
63 //! Give the number of Segments in the polyline.
64 Standard_Integer NbSegments() const;
66 //! Give the point of range Index in the Polygon.
67 const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const;
69 //! Give the point of range Index in the Polygon.
70 const gp_Pnt& EndOfSeg (const Standard_Integer Index) const;
72 //! Returns the parameter (On the curve)
73 //! of the first point of the Polygon
74 Standard_Real InfParameter() const;
76 //! Returns the parameter (On the curve)
77 //! of the last point of the Polygon
78 Standard_Real SupParameter() const;
80 //! Give an approximation of the parameter on the curve
81 //! according to the discretization of the Curve.
82 Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
84 Standard_EXPORT void Dump() const;
92 Standard_EXPORT void Init (const gp_Lin& Curve);
94 Standard_EXPORT void Init (const gp_Lin& Curve, const TColStd_Array1OfReal& Upars);
104 Standard_Real TheDeflection;
105 Standard_Integer NbPntIn;
106 TColgp_Array1OfPnt ThePnts;
107 Standard_Boolean ClosedPolygon;
110 Handle(TColStd_HArray1OfReal) myParams;
115 #define TheCurve gp_Lin
116 #define TheCurve_hxx <gp_Lin.hxx>
117 #define TheCurveTool HLRBRep_LineTool
118 #define TheCurveTool_hxx <HLRBRep_LineTool.hxx>
119 #define IntCurveSurface_Polygon HLRBRep_ThePolygonOfInterCSurf
120 #define IntCurveSurface_Polygon_hxx <HLRBRep_ThePolygonOfInterCSurf.hxx>
122 #include <IntCurveSurface_Polygon.lxx>
127 #undef TheCurveTool_hxx
128 #undef IntCurveSurface_Polygon
129 #undef IntCurveSurface_Polygon_hxx
134 #endif // _HLRBRep_ThePolygonOfInterCSurf_HeaderFile