|
|
|||
File indexing completed on 2026-07-15 08:25:41
0001 // Created on: 2002-08-02 0002 // Created by: Alexander KARTOMIN (akm) 0003 // Copyright (c) 2002-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 _LProp3d_CLProps_HeaderFile 0017 #define _LProp3d_CLProps_HeaderFile 0018 0019 #include <Adaptor3d_Curve.hxx> 0020 #include <gp_Pnt.hxx> 0021 #include <gp_Vec.hxx> 0022 #include <gp_Dir.hxx> 0023 #include <LProp_Status.hxx> 0024 0025 class LProp_BadContinuity; 0026 class Standard_DomainError; 0027 class Standard_OutOfRange; 0028 class LProp_NotDefined; 0029 class gp_Vec; 0030 class gp_Pnt; 0031 class gp_Dir; 0032 class LProp3d_CurveTool; 0033 0034 class LProp3d_CLProps 0035 { 0036 public: 0037 DEFINE_STANDARD_ALLOC 0038 0039 //! Initializes the local properties of the curve <C> 0040 //! The current point and the derivatives are 0041 //! computed at the same time, which allows an 0042 //! optimization of the computation time. 0043 //! <N> indicates the maximum number of derivations to 0044 //! be done (0, 1, 2 or 3). For example, to compute 0045 //! only the tangent, N should be equal to 1. 0046 //! <Resolution> is the linear tolerance (it is used to test 0047 //! if a vector is null). 0048 Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_Curve)& C, 0049 const Standard_Integer N, 0050 const Standard_Real Resolution); 0051 0052 //! Same as previous constructor but here the parameter is 0053 //! set to the value <U>. 0054 //! All the computations done will be related to <C> and <U>. 0055 Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_Curve)& C, 0056 const Standard_Real U, 0057 const Standard_Integer N, 0058 const Standard_Real Resolution); 0059 0060 //! Same as previous constructor but here the parameter is 0061 //! set to the value <U> and the curve is set 0062 //! with SetCurve. 0063 //! the curve can have a empty constructor 0064 //! All the computations done will be related to <C> and <U> 0065 //! when the functions "set" will be done. 0066 Standard_EXPORT LProp3d_CLProps(const Standard_Integer N, const Standard_Real Resolution); 0067 0068 //! Initializes the local properties of the curve 0069 //! for the parameter value <U>. 0070 Standard_EXPORT void SetParameter(const Standard_Real U); 0071 0072 //! Initializes the local properties of the curve 0073 //! for the new curve. 0074 Standard_EXPORT void SetCurve(const Handle(Adaptor3d_Curve)& C); 0075 0076 //! Returns the Point. 0077 Standard_EXPORT const gp_Pnt& Value() const; 0078 0079 //! Returns the first derivative. 0080 //! The derivative is computed if it has not been yet. 0081 Standard_EXPORT const gp_Vec& D1(); 0082 0083 //! Returns the second derivative. 0084 //! The derivative is computed if it has not been yet. 0085 Standard_EXPORT const gp_Vec& D2(); 0086 0087 //! Returns the third derivative. 0088 //! The derivative is computed if it has not been yet. 0089 Standard_EXPORT const gp_Vec& D3(); 0090 0091 //! Returns True if the tangent is defined. 0092 //! For example, the tangent is not defined if the 0093 //! three first derivatives are all null. 0094 Standard_EXPORT Standard_Boolean IsTangentDefined(); 0095 0096 //! output the tangent direction <D> 0097 Standard_EXPORT void Tangent(gp_Dir& D); 0098 0099 //! Returns the curvature. 0100 Standard_EXPORT Standard_Real Curvature(); 0101 0102 //! Returns the normal direction <N>. 0103 Standard_EXPORT void Normal(gp_Dir& N); 0104 0105 //! Returns the centre of curvature <P>. 0106 Standard_EXPORT void CentreOfCurvature(gp_Pnt& P); 0107 0108 protected: 0109 private: 0110 Handle(Adaptor3d_Curve) myCurve; 0111 Standard_Real myU; 0112 Standard_Integer myDerOrder; 0113 Standard_Real myCN; 0114 Standard_Real myLinTol; 0115 gp_Pnt myPnt; 0116 gp_Vec myDerivArr[3]; 0117 gp_Dir myTangent; 0118 Standard_Real myCurvature; 0119 LProp_Status myTangentStatus; 0120 Standard_Integer mySignificantFirstDerivativeOrder; 0121 }; 0122 0123 #endif // _LProp3d_CLProps_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|