|
|
|||
File indexing completed on 2026-09-28 09:20:11
0001 // Copyright (c) 2025 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _GeomGridEval_Hyperbola_HeaderFile 0015 #define _GeomGridEval_Hyperbola_HeaderFile 0016 0017 #include <Geom_Hyperbola.hxx> 0018 #include <GeomGridEval.hxx> 0019 #include <NCollection_Array1.hxx> 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 //! @brief Efficient batch evaluator for hyperbola grid points. 0024 //! 0025 //! Uses analytical formula: 0026 //! P(u) = Center + MajorRadius * cosh(u) * XDir + MinorRadius * sinh(u) * YDir 0027 //! 0028 //! Usage: 0029 //! @code 0030 //! GeomGridEval_Hyperbola anEvaluator(myGeomHyperbola); 0031 //! NCollection_Array1<gp_Pnt> aGrid = anEvaluator.EvaluateGrid(myParams); 0032 //! @endcode 0033 class GeomGridEval_Hyperbola 0034 { 0035 public: 0036 DEFINE_STANDARD_ALLOC 0037 0038 //! Constructor with geometry. 0039 //! @param theHyperbola the hyperbola geometry to evaluate 0040 GeomGridEval_Hyperbola(const occ::handle<Geom_Hyperbola>& theHyperbola) 0041 : myGeom(theHyperbola) 0042 { 0043 } 0044 0045 //! Non-copyable and non-movable. 0046 GeomGridEval_Hyperbola(const GeomGridEval_Hyperbola&) = delete; 0047 GeomGridEval_Hyperbola& operator=(const GeomGridEval_Hyperbola&) = delete; 0048 GeomGridEval_Hyperbola(GeomGridEval_Hyperbola&&) = delete; 0049 GeomGridEval_Hyperbola& operator=(GeomGridEval_Hyperbola&&) = delete; 0050 0051 //! Returns the geometry handle. 0052 const occ::handle<Geom_Hyperbola>& Geometry() const { return myGeom; } 0053 0054 //! Evaluate all grid points. 0055 //! @param theParams array of parameter values 0056 //! @return array of evaluated points (1-based indexing), 0057 //! or empty array if geometry is null or no parameters 0058 Standard_EXPORT NCollection_Array1<gp_Pnt> EvaluateGrid( 0059 const NCollection_Array1<double>& theParams) const; 0060 0061 //! Evaluate all grid points with first derivative. 0062 //! @param theParams array of parameter values 0063 //! @return array of CurveD1 (1-based indexing) 0064 Standard_EXPORT NCollection_Array1<GeomGridEval::CurveD1> EvaluateGridD1( 0065 const NCollection_Array1<double>& theParams) const; 0066 0067 //! Evaluate all grid points with first and second derivatives. 0068 //! @param theParams array of parameter values 0069 //! @return array of CurveD2 (1-based indexing) 0070 Standard_EXPORT NCollection_Array1<GeomGridEval::CurveD2> EvaluateGridD2( 0071 const NCollection_Array1<double>& theParams) const; 0072 0073 //! Evaluate all grid points with first, second, and third derivatives. 0074 //! @param theParams array of parameter values 0075 //! @return array of CurveD3 (1-based indexing) 0076 Standard_EXPORT NCollection_Array1<GeomGridEval::CurveD3> EvaluateGridD3( 0077 const NCollection_Array1<double>& theParams) const; 0078 0079 //! Evaluate Nth derivative at all grid points. 0080 //! Hyperbola has cyclic derivatives with period 2: 0081 //! D1 = MajR * sinh(u) * X + MinR * cosh(u) * Y 0082 //! D2 = MajR * cosh(u) * X + MinR * sinh(u) * Y = D0 0083 //! D3 = D1, D4 = D0, etc. 0084 //! @param theParams array of parameter values 0085 //! @param theN derivative order (N >= 1) 0086 //! @return array of derivative vectors (1-based indexing) 0087 Standard_EXPORT NCollection_Array1<gp_Vec> EvaluateGridDN( 0088 const NCollection_Array1<double>& theParams, 0089 int theN) const; 0090 0091 private: 0092 occ::handle<Geom_Hyperbola> myGeom; 0093 }; 0094 0095 #endif // _GeomGridEval_Hyperbola_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|