|
||||
File indexing completed on 2025-01-18 10:03:38
0001 // Created on: 1997-08-26 0002 // Created by: Stepan MISHIN 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_ApproxSurface_HeaderFile 0018 #define _GeomConvert_ApproxSurface_HeaderFile 0019 0020 #include <Adaptor3d_Surface.hxx> 0021 #include <GeomAbs_Shape.hxx> 0022 #include <Standard_OStream.hxx> 0023 0024 class Geom_BSplineSurface; 0025 class Geom_Surface; 0026 0027 //! A framework to convert a surface to a BSpline 0028 //! surface. This is done by approximation to a BSpline 0029 //! surface within a given tolerance. 0030 class GeomConvert_ApproxSurface 0031 { 0032 public: 0033 0034 DEFINE_STANDARD_ALLOC 0035 0036 0037 //! Constructs a surface approximation framework defined by 0038 //! - the conic Surf 0039 //! - the tolerance value Tol3d 0040 //! - the degree of continuity UContinuity, VContinuity 0041 //! in the directions of the U and V parameters 0042 //! - the highest degree MaxDegU, MaxDegV which 0043 //! the polynomial defining the BSpline curve may 0044 //! have in the directions of the U and V parameters 0045 //! - the maximum number of segments MaxSegments 0046 //! allowed in the resulting BSpline curve 0047 //! - the index of precision PrecisCode. 0048 Standard_EXPORT GeomConvert_ApproxSurface(const Handle(Geom_Surface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode); 0049 0050 //! Constructs a surface approximation framework defined by 0051 //! - the Surf 0052 //! - the tolerance value Tol3d 0053 //! - the degree of continuity UContinuity, VContinuity 0054 //! in the directions of the U and V parameters 0055 //! - the highest degree MaxDegU, MaxDegV which 0056 //! the polynomial defining the BSpline curve may 0057 //! have in the directions of the U and V parameters 0058 //! - the maximum number of segments MaxSegments 0059 //! allowed in the resulting BSpline curve 0060 //! - the index of precision PrecisCode. 0061 Standard_EXPORT GeomConvert_ApproxSurface(const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode); 0062 0063 //! Returns the BSpline surface resulting from the approximation algorithm. 0064 Standard_EXPORT Handle(Geom_BSplineSurface) Surface() const; 0065 0066 //! Returns Standard_True if the approximation has be done 0067 Standard_EXPORT Standard_Boolean IsDone() const; 0068 0069 //! Returns true if the approximation did come out with a result that 0070 //! is not NECESSARILY within the required tolerance or a result 0071 //! that is not recognized with the wished continuities. 0072 Standard_EXPORT Standard_Boolean HasResult() const; 0073 0074 //! Returns the greatest distance between a point on the 0075 //! source conic surface and the BSpline surface 0076 //! resulting from the approximation (>0 when an approximation 0077 //! has been done, 0 if no approximation ) 0078 Standard_EXPORT Standard_Real MaxError() const; 0079 0080 //! Prints on the stream o information on the current state of the object. 0081 Standard_EXPORT void Dump (Standard_OStream& o) const; 0082 0083 0084 0085 0086 protected: 0087 0088 0089 0090 0091 0092 private: 0093 0094 0095 //! Converts a surface to B-spline 0096 Standard_EXPORT void Approximate (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, const Standard_Integer theMaxDegU, const Standard_Integer theMaxDegV, const Standard_Integer theMaxSegments, const Standard_Integer thePrecisCode); 0097 0098 0099 Standard_Boolean myIsDone; 0100 Standard_Boolean myHasResult; 0101 Handle(Geom_BSplineSurface) myBSplSurf; 0102 Standard_Real myMaxError; 0103 0104 0105 }; 0106 0107 0108 0109 0110 0111 0112 0113 #endif // _GeomConvert_ApproxSurface_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |