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