|
|
|||
File indexing completed on 2026-09-28 09:20:04
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 _Geom2dGridEval_OtherCurve_HeaderFile 0015 #define _Geom2dGridEval_OtherCurve_HeaderFile 0016 0017 #include <Adaptor2d_Curve2d.hxx> 0018 #include <Geom2dGridEval.hxx> 0019 #include <NCollection_Array1.hxx> 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <functional> 0024 0025 //! @brief Fallback evaluator for unknown 2D curve types. 0026 //! 0027 //! Uses Adaptor2d_Curve2d::D0 for point-by-point evaluation. 0028 //! This is the slowest evaluator but handles any 2D curve type. 0029 //! 0030 //! @note The curve adaptor reference must remain valid during the lifetime 0031 //! of this evaluator. The evaluator does not take ownership. 0032 //! 0033 //! Usage: 0034 //! @code 0035 //! Geom2dGridEval_OtherCurve anEvaluator(myCurveAdaptor2d); 0036 //! NCollection_Array1<gp_Pnt2d> aGrid = anEvaluator.EvaluateGrid(myParams); 0037 //! @endcode 0038 class Geom2dGridEval_OtherCurve 0039 { 0040 public: 0041 DEFINE_STANDARD_ALLOC 0042 0043 //! Constructor with curve adaptor reference. 0044 //! @param theCurve reference to 2D curve adaptor (must remain valid) 0045 Geom2dGridEval_OtherCurve(const Adaptor2d_Curve2d& theCurve) 0046 : myCurve(theCurve) 0047 { 0048 } 0049 0050 //! Non-copyable and non-movable. 0051 Geom2dGridEval_OtherCurve(const Geom2dGridEval_OtherCurve&) = delete; 0052 Geom2dGridEval_OtherCurve& operator=(const Geom2dGridEval_OtherCurve&) = delete; 0053 Geom2dGridEval_OtherCurve(Geom2dGridEval_OtherCurve&&) = delete; 0054 Geom2dGridEval_OtherCurve& operator=(Geom2dGridEval_OtherCurve&&) = delete; 0055 0056 //! Returns the curve adaptor reference. 0057 const Adaptor2d_Curve2d& Curve() const { return myCurve.get(); } 0058 0059 //! Evaluate all grid points. 0060 //! @param theParams array of parameter values 0061 //! @return array of evaluated points (1-based indexing), 0062 //! or empty array if no parameters 0063 Standard_EXPORT NCollection_Array1<gp_Pnt2d> EvaluateGrid( 0064 const NCollection_Array1<double>& theParams) const; 0065 0066 //! Evaluate all grid points with first derivative. 0067 //! @param theParams array of parameter values 0068 //! @return array of CurveD1 (1-based indexing), 0069 //! or empty array if no parameters 0070 Standard_EXPORT NCollection_Array1<Geom2dGridEval::CurveD1> EvaluateGridD1( 0071 const NCollection_Array1<double>& theParams) const; 0072 0073 //! Evaluate all grid points with first and second derivatives. 0074 //! @param theParams array of parameter values 0075 //! @return array of CurveD2 (1-based indexing), 0076 //! or empty array if no parameters 0077 Standard_EXPORT NCollection_Array1<Geom2dGridEval::CurveD2> EvaluateGridD2( 0078 const NCollection_Array1<double>& theParams) const; 0079 0080 //! Evaluate all grid points with first, second, and third derivatives. 0081 //! @param theParams array of parameter values 0082 //! @return array of CurveD3 (1-based indexing), 0083 //! or empty array if no parameters 0084 Standard_EXPORT NCollection_Array1<Geom2dGridEval::CurveD3> EvaluateGridD3( 0085 const NCollection_Array1<double>& theParams) const; 0086 0087 //! Evaluate Nth derivative at all grid points. 0088 //! For orders 1-3, reuses EvaluateGridD1/D2/D3. 0089 //! For orders > 3, uses adaptor DN method. 0090 //! @param theParams array of parameter values 0091 //! @param theN derivative order (N >= 1) 0092 //! @return array of derivative vectors (1-based indexing) 0093 Standard_EXPORT NCollection_Array1<gp_Vec2d> EvaluateGridDN( 0094 const NCollection_Array1<double>& theParams, 0095 int theN) const; 0096 0097 private: 0098 std::reference_wrapper<const Adaptor2d_Curve2d> myCurve; 0099 }; 0100 0101 #endif // _Geom2dGridEval_OtherCurve_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|