Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:02

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 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   Standard_EXPORT BlendFunc_Corde(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& CGuide);
0042   
0043   Standard_EXPORT void SetParam (const Standard_Real Param);
0044   
0045   Standard_EXPORT void SetDist (const Standard_Real Dist);
0046   
0047   //! computes the values <F> of the Function for the
0048   //! variable <X>.
0049   //! Returns True if the computation was done successfully,
0050   //! False otherwise.
0051   Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
0052   
0053   //! returns the values <D> of the derivatives for the
0054   //! variable <X>.
0055   //! Returns True if the computation was done successfully,
0056   //! False otherwise.
0057   Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
0058   
0059   Standard_EXPORT const gp_Pnt& PointOnS() const;
0060   
0061   //! returns the point of parameter <Param> on CGuide
0062   Standard_EXPORT const gp_Pnt& PointOnGuide() const;
0063   
0064   //! returns the normal to CGuide at Ptgui.
0065   Standard_EXPORT const gp_Vec& NPlan() const;
0066   
0067   //! Returns True when it is not possible to compute
0068   //! the tangent vectors at PointOnS.
0069   Standard_EXPORT Standard_Boolean IsTangencyPoint() const;
0070   
0071   //! Returns the tangent vector at PointOnS, in 3d space.
0072   Standard_EXPORT const gp_Vec& TangentOnS() const;
0073   
0074   //! Returns the tangent vector at PointOnS, in the
0075   //! parametric space of the first surface.
0076   Standard_EXPORT const gp_Vec2d& Tangent2dOnS() const;
0077   
0078   //! Derived of the function compared to the parameter
0079   //! of the guideline
0080   Standard_EXPORT void DerFguide (const math_Vector& Sol, gp_Vec2d& DerF);
0081   
0082   //! Returns False if Sol is not solution else returns
0083   //! True and updates the fields tgs and tg2d
0084   Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol);
0085 
0086 
0087 
0088 
0089 protected:
0090 
0091 
0092 
0093 
0094 
0095 private:
0096 
0097 
0098 
0099   Handle(Adaptor3d_Surface) surf;
0100   Handle(Adaptor3d_Curve) guide;
0101   gp_Pnt pts;
0102   gp_Pnt2d pt2d;
0103   Standard_Real dis;
0104   Standard_Real normtg;
0105   Standard_Real theD;
0106   gp_Pnt ptgui;
0107   gp_Vec nplan;
0108   gp_Vec d1gui;
0109   gp_Vec d2gui;
0110   gp_Vec tgs;
0111   gp_Vec2d tg2d;
0112   Standard_Boolean istangent;
0113 
0114 
0115 };
0116 
0117 
0118 
0119 
0120 
0121 
0122 
0123 #endif // _BlendFunc_Corde_HeaderFile