0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / Approx / Approx_Curve3d.hxx
CommitLineData
42cf5bc1 1// Created on: 1998-08-20
2// Created by: Philippe MANGIN
3// Copyright (c) 1998-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 _Approx_Curve3d_HeaderFile
18#define _Approx_Curve3d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
42cf5bc1 24#include <GeomAbs_Shape.hxx>
d1a67b9d 25#include <Geom_BSplineCurve.hxx>
42cf5bc1 26
d1a67b9d 27class Adaptor3d_HCurve;
42cf5bc1 28
29class Approx_Curve3d
30{
31public:
32
33 DEFINE_STANDARD_ALLOC
34
35
36 //! Approximation of a curve with respect of the
37 //! requiered tolerance Tol3D.
38 Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
39
40 Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const;
41
42 //! returns Standard_True if the approximation has
43 //! been done within requiered tolerance
44 Standard_EXPORT Standard_Boolean IsDone() const;
45
46 //! returns Standard_True if the approximation did come out
47 //! with a result that is not NECESSARELY within the required
48 //! tolerance
49 Standard_EXPORT Standard_Boolean HasResult() const;
50
51 //! returns the Maximum Error (>0 when an approximation
52 //! has been done, 0 if no approximation)
53 Standard_EXPORT Standard_Real MaxError() const;
54
55 //! Print on the stream o information about the object
56 Standard_EXPORT void Dump (Standard_OStream& o) const;
57
42cf5bc1 58private:
59
42cf5bc1 60 Standard_Boolean myIsDone;
61 Standard_Boolean myHasResult;
62 Handle(Geom_BSplineCurve) myBSplCurve;
63 Standard_Real myMaxError;
64
42cf5bc1 65};
66
42cf5bc1 67#endif // _Approx_Curve3d_HeaderFile