|
|
|||
Warning, file /include/opencascade/GeomConvert_ApproxCurve.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // Created on: 1997-09-11 0002 // Created by: Roman BORISOV 0003 // Copyright (c) 1997-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _GeomConvert_ApproxCurve_HeaderFile 0018 #define _GeomConvert_ApproxCurve_HeaderFile 0019 0020 #include <Adaptor3d_Curve.hxx> 0021 #include <GeomAbs_Shape.hxx> 0022 #include <Standard_OStream.hxx> 0023 0024 class Geom_BSplineCurve; 0025 class Geom_Curve; 0026 0027 //! A framework to convert a 3D curve to a 3D BSpline. 0028 //! This is done by approximation to a BSpline curve within a given tolerance. 0029 class GeomConvert_ApproxCurve 0030 { 0031 public: 0032 0033 DEFINE_STANDARD_ALLOC 0034 0035 0036 //! Constructs a curve approximation framework defined by - 0037 //! - the conic Curve, 0038 //! - the tolerance value Tol3d, 0039 //! - the degree of continuity Order, 0040 //! - the maximum number of segments 0041 //! MaxSegments allowed in the resulting BSpline curve, and 0042 //! - the highest degree MaxDeg which the 0043 //! polynomial defining the BSpline curve may have. 0044 Standard_EXPORT GeomConvert_ApproxCurve(const Handle(Geom_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); 0045 0046 //! Constructs a curve approximation framework defined by - 0047 //! - the Curve, 0048 //! - the tolerance value Tol3d, 0049 //! - the degree of continuity Order, 0050 //! - the maximum number of segments 0051 //! MaxSegments allowed in the resulting BSpline curve, and 0052 //! - the highest degree MaxDeg which the 0053 //! polynomial defining the BSpline curve may have. 0054 Standard_EXPORT GeomConvert_ApproxCurve(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree); 0055 0056 //! Returns the BSpline curve resulting from the approximation algorithm. 0057 Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const; 0058 0059 //! returns Standard_True if the approximation has 0060 //! been done within required tolerance 0061 Standard_EXPORT Standard_Boolean IsDone() const; 0062 0063 //! Returns Standard_True if the approximation did come out 0064 //! with a result that is not NECESSARELY within the required tolerance 0065 Standard_EXPORT Standard_Boolean HasResult() const; 0066 0067 //! Returns the greatest distance between a point on the 0068 //! source conic and the BSpline curve resulting from the 0069 //! approximation. (>0 when an approximation 0070 //! has been done, 0 if no approximation) 0071 Standard_EXPORT Standard_Real MaxError() const; 0072 0073 //! Print on the stream o information about the object 0074 Standard_EXPORT void Dump (Standard_OStream& o) const; 0075 0076 0077 0078 0079 protected: 0080 0081 0082 0083 0084 0085 private: 0086 0087 0088 //! Converts a curve to B-spline 0089 Standard_EXPORT void Approximate (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree); 0090 0091 0092 Standard_Boolean myIsDone; 0093 Standard_Boolean myHasResult; 0094 Handle(Geom_BSplineCurve) myBSplCurve; 0095 Standard_Real myMaxError; 0096 0097 0098 }; 0099 0100 0101 0102 0103 0104 0105 0106 #endif // _GeomConvert_ApproxCurve_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|