|
||||
File indexing completed on 2025-01-18 10:04:55
0001 // Created on: 2001-12-20 0002 // Created by: Pavel TELKOV 0003 // Copyright (c) 2001-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _ShapeCustom_Curve2d_HeaderFile 0017 #define _ShapeCustom_Curve2d_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <TColgp_Array1OfPnt2d.hxx> 0024 class Geom2d_Line; 0025 class Geom2d_Curve; 0026 class Geom2d_BSplineCurve; 0027 0028 0029 //! Converts curve2d to analytical form with given 0030 //! precision or simpify curve2d. 0031 class ShapeCustom_Curve2d 0032 { 0033 public: 0034 0035 DEFINE_STANDARD_ALLOC 0036 0037 0038 //! Check if poleses is in the plane with given precision 0039 //! Returns false if no. 0040 Standard_EXPORT static Standard_Boolean IsLinear (const TColgp_Array1OfPnt2d& thePoles, const Standard_Real theTolerance, Standard_Real& theDeviation); 0041 0042 //! Try to convert BSpline2d or Bezier2d to line 2d 0043 //! only if it is linear. Recalculate first and last parameters. 0044 //! Returns line2d or null curve2d. 0045 Standard_EXPORT static Handle(Geom2d_Line) ConvertToLine2d (const Handle(Geom2d_Curve)& theCurve, const Standard_Real theFirstIn, const Standard_Real theLastIn, const Standard_Real theTolerance, Standard_Real& theNewFirst, Standard_Real& theNewLast, Standard_Real& theDeviation); 0046 0047 //! Try to remove knots from bspline where local derivatives are the same. 0048 //! Remove knots with given precision. 0049 //! Returns false if Bsplien was not modified 0050 Standard_EXPORT static Standard_Boolean SimplifyBSpline2d (Handle(Geom2d_BSplineCurve)& theBSpline2d, const Standard_Real theTolerance); 0051 0052 0053 0054 0055 protected: 0056 0057 0058 0059 0060 0061 private: 0062 0063 0064 0065 0066 0067 }; 0068 0069 0070 0071 0072 0073 0074 0075 #endif // _ShapeCustom_Curve2d_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |