|
||||
File indexing completed on 2025-01-18 10:04:13
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 0035 0036 class LProp3d_CLProps 0037 { 0038 public: 0039 0040 DEFINE_STANDARD_ALLOC 0041 0042 0043 //! Initializes the local properties of the curve <C> 0044 //! The current point and the derivatives are 0045 //! computed at the same time, which allows an 0046 //! optimization of the computation time. 0047 //! <N> indicates the maximum number of derivations to 0048 //! be done (0, 1, 2 or 3). For example, to compute 0049 //! only the tangent, N should be equal to 1. 0050 //! <Resolution> is the linear tolerance (it is used to test 0051 //! if a vector is null). 0052 Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_Curve)& C, const Standard_Integer N, const Standard_Real Resolution); 0053 0054 //! Same as previous constructor but here the parameter is 0055 //! set to the value <U>. 0056 //! All the computations done will be related to <C> and <U>. 0057 Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution); 0058 0059 //! Same as previous constructor but here the parameter is 0060 //! set to the value <U> and the curve is set 0061 //! with SetCurve. 0062 //! the curve can have a empty constructor 0063 //! All the computations done will be related to <C> and <U> 0064 //! when the functions "set" will be done. 0065 Standard_EXPORT LProp3d_CLProps(const Standard_Integer N, const Standard_Real Resolution); 0066 0067 //! Initializes the local properties of the curve 0068 //! for the parameter value <U>. 0069 Standard_EXPORT void SetParameter (const Standard_Real U); 0070 0071 //! Initializes the local properties of the curve 0072 //! for the new curve. 0073 Standard_EXPORT void SetCurve (const Handle(Adaptor3d_Curve)& C); 0074 0075 //! Returns the Point. 0076 Standard_EXPORT const gp_Pnt& Value() const; 0077 0078 //! Returns the first derivative. 0079 //! The derivative is computed if it has not been yet. 0080 Standard_EXPORT const gp_Vec& D1(); 0081 0082 //! Returns the second derivative. 0083 //! The derivative is computed if it has not been yet. 0084 Standard_EXPORT const gp_Vec& D2(); 0085 0086 //! Returns the third derivative. 0087 //! The derivative is computed if it has not been yet. 0088 Standard_EXPORT const gp_Vec& D3(); 0089 0090 //! Returns True if the tangent is defined. 0091 //! For example, the tangent is not defined if the 0092 //! three first derivatives are all null. 0093 Standard_EXPORT Standard_Boolean IsTangentDefined(); 0094 0095 //! output the tangent direction <D> 0096 Standard_EXPORT void Tangent (gp_Dir& D); 0097 0098 //! Returns the curvature. 0099 Standard_EXPORT Standard_Real Curvature(); 0100 0101 //! Returns the normal direction <N>. 0102 Standard_EXPORT void Normal (gp_Dir& N); 0103 0104 //! Returns the centre of curvature <P>. 0105 Standard_EXPORT void CentreOfCurvature (gp_Pnt& P); 0106 0107 0108 0109 0110 protected: 0111 0112 0113 0114 0115 0116 private: 0117 0118 0119 0120 Handle(Adaptor3d_Curve) myCurve; 0121 Standard_Real myU; 0122 Standard_Integer myDerOrder; 0123 Standard_Real myCN; 0124 Standard_Real myLinTol; 0125 gp_Pnt myPnt; 0126 gp_Vec myDerivArr[3]; 0127 gp_Dir myTangent; 0128 Standard_Real myCurvature; 0129 LProp_Status myTangentStatus; 0130 Standard_Integer mySignificantFirstDerivativeOrder; 0131 0132 0133 }; 0134 0135 0136 0137 0138 0139 0140 0141 #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 |