|
||||
File indexing completed on 2025-01-18 10:03:23
0001 // Created on: 1991-07-15 0002 // Created by: Isabelle GRIGNON 0003 // Copyright (c) 1991-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 _CPnts_AbscissaPoint_HeaderFile 0018 #define _CPnts_AbscissaPoint_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <CPnts_MyRootFunction.hxx> 0024 class Adaptor3d_Curve; 0025 class Adaptor2d_Curve2d; 0026 0027 0028 //! the algorithm computes a point on a curve at a given 0029 //! distance from another point on the curve 0030 //! 0031 //! We can instantiates with 0032 //! Curve from Adaptor3d, Pnt from gp, Vec from gp 0033 //! 0034 //! or 0035 //! Curve2d from Adaptor2d, Pnt2d from gp, Vec2d from gp 0036 class CPnts_AbscissaPoint 0037 { 0038 public: 0039 0040 DEFINE_STANDARD_ALLOC 0041 0042 0043 //! Computes the length of the Curve <C>. 0044 Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C); 0045 0046 //! Computes the length of the Curve <C>. 0047 Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C); 0048 0049 //! Computes the length of the Curve <C> with the given tolerance. 0050 Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C, const Standard_Real Tol); 0051 0052 //! Computes the length of the Curve <C> with the given tolerance. 0053 Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C, const Standard_Real Tol); 0054 0055 //! Computes the length of the Curve <C> between <U1> and <U2>. 0056 Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2); 0057 0058 //! Computes the length of the Curve <C> between <U1> and <U2>. 0059 Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2); 0060 0061 //! Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. 0062 Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); 0063 0064 //! Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. 0065 //! creation of a indefinite AbscissaPoint. 0066 Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); 0067 0068 Standard_EXPORT CPnts_AbscissaPoint(); 0069 0070 //! the algorithm computes a point on a curve <Curve> at the 0071 //! distance <Abscissa> from the point of parameter <U0>. 0072 //! <Resolution> is the error allowed in the computation. 0073 //! The computed point can be outside of the curve 's bounds. 0074 Standard_EXPORT CPnts_AbscissaPoint(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Resolution); 0075 0076 //! the algorithm computes a point on a curve <Curve> at the 0077 //! distance <Abscissa> from the point of parameter <U0>. 0078 //! <Resolution> is the error allowed in the computation. 0079 //! The computed point can be outside of the curve 's bounds. 0080 Standard_EXPORT CPnts_AbscissaPoint(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Resolution); 0081 0082 //! the algorithm computes a point on a curve <Curve> at the 0083 //! distance <Abscissa> from the point of parameter <U0>. 0084 //! <Ui> is the starting value used in the iterative process 0085 //! which find the solution, it must be closed to the final 0086 //! solution 0087 //! <Resolution> is the error allowed in the computation. 0088 //! The computed point can be outside of the curve 's bounds. 0089 Standard_EXPORT CPnts_AbscissaPoint(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Resolution); 0090 0091 //! the algorithm computes a point on a curve <Curve> at the 0092 //! distance <Abscissa> from the point of parameter <U0>. 0093 //! <Ui> is the starting value used in the iterative process 0094 //! which find the solution, it must be closed to the final 0095 //! solution 0096 //! <Resolution> is the error allowed in the computation. 0097 //! The computed point can be outside of the curve 's bounds. 0098 Standard_EXPORT CPnts_AbscissaPoint(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Resolution); 0099 0100 //! Initializes the resolution function with <C>. 0101 Standard_EXPORT void Init (const Adaptor3d_Curve& C); 0102 0103 //! Initializes the resolution function with <C>. 0104 Standard_EXPORT void Init (const Adaptor2d_Curve2d& C); 0105 0106 //! Initializes the resolution function with <C>. 0107 Standard_EXPORT void Init (const Adaptor3d_Curve& C, const Standard_Real Tol); 0108 0109 //! Initializes the resolution function with <C>. 0110 Standard_EXPORT void Init (const Adaptor2d_Curve2d& C, const Standard_Real Tol); 0111 0112 //! Initializes the resolution function with <C> 0113 //! between U1 and U2. 0114 Standard_EXPORT void Init (const Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2); 0115 0116 //! Initializes the resolution function with <C> 0117 //! between U1 and U2. 0118 Standard_EXPORT void Init (const Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2); 0119 0120 //! Initializes the resolution function with <C> 0121 //! between U1 and U2. 0122 Standard_EXPORT void Init (const Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); 0123 0124 //! Initializes the resolution function with <C> 0125 //! between U1 and U2. 0126 Standard_EXPORT void Init (const Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); 0127 0128 //! Computes the point at the distance <Abscissa> of 0129 //! the curve. 0130 //! U0 is the parameter of the point from which the distance 0131 //! is measured. 0132 Standard_EXPORT void Perform (const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Resolution); 0133 0134 //! Computes the point at the distance <Abscissa> of 0135 //! the curve. 0136 //! U0 is the parameter of the point from which the distance 0137 //! is measured and Ui is the starting value for the iterative 0138 //! process (should be close to the final solution). 0139 Standard_EXPORT void Perform (const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Resolution); 0140 0141 //! Computes the point at the distance <Abscissa> of 0142 //! the curve; performs more appropriate tolerance management; 0143 //! to use this method in right way it is necessary to call 0144 //! empty constructor. then call method Init with 0145 //! Tolerance = Resolution, then call AdvPermorm. 0146 //! U0 is the parameter of the point from which the distance 0147 //! is measured and Ui is the starting value for the iterative 0148 //! process (should be close to the final solution). 0149 Standard_EXPORT void AdvPerform (const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Resolution); 0150 0151 //! True if the computation was successful, False otherwise. 0152 Standard_Boolean IsDone() const; 0153 0154 //! Returns the parameter of the solution. 0155 Standard_Real Parameter() const; 0156 0157 //! Enforce the solution, used by GCPnts. 0158 void SetParameter (const Standard_Real P); 0159 0160 0161 0162 0163 protected: 0164 0165 0166 0167 0168 0169 private: 0170 0171 0172 0173 Standard_Boolean myDone; 0174 Standard_Real myL; 0175 Standard_Real myParam; 0176 Standard_Real myUMin; 0177 Standard_Real myUMax; 0178 CPnts_MyRootFunction myF; 0179 0180 0181 }; 0182 0183 0184 #include <CPnts_AbscissaPoint.lxx> 0185 0186 0187 0188 0189 0190 #endif // _CPnts_AbscissaPoint_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |