|
||||
File indexing completed on 2025-01-18 10:04:55
0001 // Created on: 1998-06-03 0002 // Created by: data exchange team 0003 // Copyright (c) 1998-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 _ShapeCustom_Surface_HeaderFile 0018 #define _ShapeCustom_Surface_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Standard_Real.hxx> 0025 #include <Standard_Boolean.hxx> 0026 class Geom_Surface; 0027 0028 0029 //! Converts a surface to the analytical form with given 0030 //! precision. Conversion is done only the surface is bspline 0031 //! of bezier and this can be approximated by some analytical 0032 //! surface with that precision. 0033 class ShapeCustom_Surface 0034 { 0035 public: 0036 0037 DEFINE_STANDARD_ALLOC 0038 0039 0040 Standard_EXPORT ShapeCustom_Surface(); 0041 0042 Standard_EXPORT ShapeCustom_Surface(const Handle(Geom_Surface)& S); 0043 0044 Standard_EXPORT void Init (const Handle(Geom_Surface)& S); 0045 0046 //! Returns maximal deviation of converted surface from the original 0047 //! one computed by last call to ConvertToAnalytical 0048 Standard_Real Gap() const; 0049 0050 //! Tries to convert the Surface to an Analytic form 0051 //! Returns the result 0052 //! Works only if the Surface is BSpline or Bezier. 0053 //! Else, or in case of failure, returns a Null Handle 0054 //! 0055 //! If <substitute> is True, the new surface replaces the actual 0056 //! one in <me> 0057 //! 0058 //! It works by analysing the case which can apply, creating the 0059 //! corresponding analytic surface, then checking coincidence 0060 //! Warning: Parameter laws are not kept, hence PCurves should be redone 0061 Standard_EXPORT Handle(Geom_Surface) ConvertToAnalytical (const Standard_Real tol, const Standard_Boolean substitute); 0062 0063 //! Tries to convert the Surface to the Periodic form 0064 //! Returns the resulting surface 0065 //! Works only if the Surface is BSpline and is closed with 0066 //! Precision::Confusion() 0067 //! Else, or in case of failure, returns a Null Handle 0068 Standard_EXPORT Handle(Geom_Surface) ConvertToPeriodic (const Standard_Boolean substitute, const Standard_Real preci = -1); 0069 0070 0071 0072 0073 protected: 0074 0075 0076 0077 0078 0079 private: 0080 0081 0082 0083 Handle(Geom_Surface) mySurf; 0084 Standard_Real myGap; 0085 0086 0087 }; 0088 0089 0090 #include <ShapeCustom_Surface.lxx> 0091 0092 0093 0094 0095 0096 #endif // _ShapeCustom_Surface_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |