|
|
|||
File indexing completed on 2026-09-18 09:19:35
0001 // Created on: 1996-06-04 0002 // Created by: Stagiaire Xuan Trang PHAMPHU 0003 // Copyright (c) 1996-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 _BlendFunc_Corde_HeaderFile 0018 #define _BlendFunc_Corde_HeaderFile 0019 0020 #include <Adaptor3d_Surface.hxx> 0021 #include <gp_Pnt.hxx> 0022 #include <gp_Pnt2d.hxx> 0023 #include <gp_Vec.hxx> 0024 #include <gp_Vec2d.hxx> 0025 #include <math_Vector.hxx> 0026 0027 class math_Matrix; 0028 0029 //! This function calculates point (pts) on the curve of 0030 //! intersection between the normal to a curve (guide) 0031 //! in a chosen parameter and a surface (surf), so 0032 //! that pts was at a given distance from the guide. 0033 //! X(1),X(2) are the parameters U,V of pts on surf. 0034 class BlendFunc_Corde 0035 { 0036 public: 0037 DEFINE_STANDARD_ALLOC 0038 0039 Standard_EXPORT BlendFunc_Corde(const occ::handle<Adaptor3d_Surface>& S, 0040 const occ::handle<Adaptor3d_Curve>& CGuide); 0041 0042 Standard_EXPORT void SetParam(const double Param); 0043 0044 Standard_EXPORT void SetDist(const double Dist); 0045 0046 //! computes the values <F> of the Function for the 0047 //! variable <X>. 0048 //! Returns True if the computation was done successfully, 0049 //! False otherwise. 0050 Standard_EXPORT bool Value(const math_Vector& X, math_Vector& F); 0051 0052 //! returns the values <D> of the derivatives for the 0053 //! variable <X>. 0054 //! Returns True if the computation was done successfully, 0055 //! False otherwise. 0056 Standard_EXPORT bool Derivatives(const math_Vector& X, math_Matrix& D); 0057 0058 Standard_EXPORT const gp_Pnt& PointOnS() const; 0059 0060 //! returns the point of parameter <Param> on CGuide 0061 Standard_EXPORT const gp_Pnt& PointOnGuide() const; 0062 0063 //! returns the normal to CGuide at Ptgui. 0064 Standard_EXPORT const gp_Vec& NPlan() const; 0065 0066 //! Returns True when it is not possible to compute 0067 //! the tangent vectors at PointOnS. 0068 Standard_EXPORT bool IsTangencyPoint() const; 0069 0070 //! Returns the tangent vector at PointOnS, in 3d space. 0071 Standard_EXPORT const gp_Vec& TangentOnS() const; 0072 0073 //! Returns the tangent vector at PointOnS, in the 0074 //! parametric space of the first surface. 0075 Standard_EXPORT const gp_Vec2d& Tangent2dOnS() const; 0076 0077 //! Derived of the function compared to the parameter 0078 //! of the guideline 0079 Standard_EXPORT void DerFguide(const math_Vector& Sol, gp_Vec2d& DerF); 0080 0081 //! Returns False if Sol is not solution else returns 0082 //! True and updates the fields tgs and tg2d 0083 Standard_EXPORT bool IsSolution(const math_Vector& Sol, const double Tol); 0084 0085 private: 0086 occ::handle<Adaptor3d_Surface> surf; 0087 occ::handle<Adaptor3d_Curve> guide; 0088 gp_Pnt pts; 0089 gp_Pnt2d pt2d; 0090 double dis; 0091 double normtg; 0092 double theD; 0093 gp_Pnt ptgui; 0094 gp_Vec nplan; 0095 gp_Vec d1gui; 0096 gp_Vec d2gui; 0097 gp_Vec tgs; 0098 gp_Vec2d tg2d; 0099 bool istangent; 0100 }; 0101 0102 #endif // _BlendFunc_Corde_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|