1 // Created on: 1996-06-04
2 // Created by: Stagiaire Xuan Trang PHAMPHU
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BlendFunc_Corde_HeaderFile
18 #define _BlendFunc_Corde_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
25 #include <gp_Pnt2d.hxx>
26 #include <Standard_Real.hxx>
28 #include <gp_Vec2d.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <math_Vector.hxx>
31 class Adaptor3d_HSurface;
32 class Adaptor3d_HCurve;
33 class Standard_DomainError;
40 //! This function calculates point (pts) on the curve of
41 //! intersection between the normal to a curve (guide)
42 //! in a chosen parameter and a surface (surf), so
43 //! that pts was at a given distance from the guide.
44 //! X(1),X(2) are the parameters U,V of pts on surf.
52 Standard_EXPORT BlendFunc_Corde(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& CGuide);
54 Standard_EXPORT void SetParam (const Standard_Real Param);
56 Standard_EXPORT void SetDist (const Standard_Real Dist);
58 //! computes the values <F> of the Function for the
60 //! Returns True if the computation was done successfully,
62 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
64 //! returns the values <D> of the derivatives for the
66 //! Returns True if the computation was done successfully,
68 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
70 Standard_EXPORT const gp_Pnt& PointOnS() const;
72 //! returns the point of parameter <Param> on CGuide
73 Standard_EXPORT const gp_Pnt& PointOnGuide() const;
75 //! returns the normal to CGuide at Ptgui.
76 Standard_EXPORT const gp_Vec& NPlan() const;
78 //! Returns True when it is not possible to compute
79 //! the tangent vectors at PointOnS.
80 Standard_EXPORT Standard_Boolean IsTangencyPoint() const;
82 //! Returns the tangent vector at PointOnS, in 3d space.
83 Standard_EXPORT const gp_Vec& TangentOnS() const;
85 //! Returns the tangent vector at PointOnS, in the
86 //! parametric space of the first surface.
87 Standard_EXPORT const gp_Vec2d& Tangent2dOnS() const;
89 //! Derived of the function compared to the parameter
91 Standard_EXPORT void DerFguide (const math_Vector& Sol, gp_Vec2d& DerF);
93 //! Returns False if Sol is not solution else returns
94 //! True and updates the fields tgs and tg2d
95 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol);
110 Handle(Adaptor3d_HSurface) surf;
111 Handle(Adaptor3d_HCurve) guide;
115 Standard_Real normtg;
123 Standard_Boolean istangent;
134 #endif // _BlendFunc_Corde_HeaderFile