1 // Created on: 1993-12-03
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 #ifndef _BlendFunc_HeaderFile
18 #define _BlendFunc_HeaderFile
19 
20 #include <Adaptor3d_Surface.hxx>
21 #include <BlendFunc_SectionShape.hxx>
22 #include <Convert_ParameterisationType.hxx>
23 #include <TColStd_Array1OfReal.hxx>
24 #include <TColStd_Array1OfInteger.hxx>
25 #include <GeomAbs_Shape.hxx>
26 
27 class gp_Pnt2d;
28 class gp_Vec;
29 
30 
31 //! This package provides a set of generic functions, that can
32 //! instantiated to compute blendings between two surfaces
33 //! (Constant radius, Evolutive radius, Ruled surface).
34 class BlendFunc
35 {
36 public:
37 
38   DEFINE_STANDARD_ALLOC
39 
40 
41   Standard_EXPORT static void GetShape (const BlendFunc_SectionShape SectShape, const Standard_Real MaxAng, Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Convert_ParameterisationType& TypeConv);
42 
43   Standard_EXPORT static void Knots (const BlendFunc_SectionShape SectShape, TColStd_Array1OfReal& TKnots);
44 
45   Standard_EXPORT static void Mults (const BlendFunc_SectionShape SectShape, TColStd_Array1OfInteger& TMults);
46 
47   Standard_EXPORT static void GetMinimalWeights (const BlendFunc_SectionShape SectShape, const Convert_ParameterisationType TConv, const Standard_Real AngleMin, const Standard_Real AngleMax, TColStd_Array1OfReal& Weigths);
48 
49   //! Used  to obtain the next level of continuity.
50   Standard_EXPORT static GeomAbs_Shape NextShape (const GeomAbs_Shape S);
51 
52   Standard_EXPORT static Standard_Boolean ComputeNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal);
53 
54   Standard_EXPORT static Standard_Boolean ComputeDNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal, gp_Vec& DNu, gp_Vec& DNv);
55 
56 
57 
58 
59 protected:
60 
61 
62 
63 
64 
65 private:
66 
67 
68 
69 
70 friend class BlendFunc_ConstRad;
71 friend class BlendFunc_ConstRadInv;
72 friend class BlendFunc_Ruled;
73 friend class BlendFunc_RuledInv;
74 friend class BlendFunc_EvolRad;
75 friend class BlendFunc_EvolRadInv;
76 friend class BlendFunc_CSConstRad;
77 friend class BlendFunc_CSCircular;
78 friend class BlendFunc_Corde;
79 friend class BlendFunc_Chamfer;
80 friend class BlendFunc_ChamfInv;
81 friend class BlendFunc_ChAsym;
82 friend class BlendFunc_ChAsymInv;
83 friend class BlendFunc_Tensor;
84 
85 };
86 
87 
88 
89 
90 
91 
92 
93 #endif // _BlendFunc_HeaderFile
94