1 // Created on: 1996-06-06
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_Chamfer_HeaderFile
18 #define _BlendFunc_Chamfer_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Integer.hxx>
25 #include <Standard_Real.hxx>
26 #include <BlendFunc_Corde.hxx>
27 #include <BlendFunc_GenChamfer.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <math_Vector.hxx>
30 #include <TColStd_Array1OfReal.hxx>
31 #include <GeomAbs_Shape.hxx>
32 #include <TColStd_Array1OfInteger.hxx>
33 #include <TColgp_Array1OfPnt.hxx>
34 #include <TColgp_Array1OfVec.hxx>
35 #include <TColgp_Array1OfPnt2d.hxx>
36 #include <TColgp_Array1OfVec2d.hxx>
37 class Adaptor3d_HSurface;
38 class Adaptor3d_HCurve;
48 //! Class for a function used to compute a "ordinary" chamfer:
49 //! when distances from spine to surfaces are constant
50 class BlendFunc_Chamfer : public BlendFunc_GenChamfer
57 Standard_EXPORT BlendFunc_Chamfer(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& CG);
59 //! computes the values <F> of the Functions for the
61 //! Returns True if the computation was done successfully,
63 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
65 //! returns the values <D> of the derivatives for the
67 //! Returns True if the computation was done successfully,
69 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
71 Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
73 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
75 Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
77 Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
79 Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
81 Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
83 Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
85 Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
87 Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
89 //! Returns the tangent vector at the section,
90 //! at the beginning and the end of the section, and
91 //! returns the normal (of the surfaces) at
93 Standard_EXPORT void Tangent (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, gp_Vec& TgFirst, gp_Vec& TgLast, gp_Vec& NormFirst, gp_Vec& NormLast) const Standard_OVERRIDE;
95 //! Sets the distances and the "quadrant".
96 Standard_EXPORT void Set (const Standard_Real Dist1, const Standard_Real Dist2, const Standard_Integer Choix) Standard_OVERRIDE;
98 //! Returns the length of the maximum section
99 Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
114 BlendFunc_Corde corde1;
115 BlendFunc_Corde corde2;
126 #endif // _BlendFunc_Chamfer_HeaderFile