0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BlendFunc / BlendFunc_ConstThroatWithPenetration.hxx
1 // Created by: Julia GERASIMOVA
2 // Copyright (c) 2015 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #ifndef _BlendFunc_ConstThroatWithPenetration_HeaderFile
16 #define _BlendFunc_ConstThroatWithPenetration_HeaderFile
17
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
21
22 #include <Standard_Integer.hxx>
23 #include <Standard_Real.hxx>
24 #include <BlendFunc_ConstThroat.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <math_Vector.hxx>
27 #include <TColStd_Array1OfReal.hxx>
28 #include <GeomAbs_Shape.hxx>
29 #include <TColStd_Array1OfInteger.hxx>
30 #include <TColgp_Array1OfPnt.hxx>
31 #include <TColgp_Array1OfVec.hxx>
32 #include <TColgp_Array1OfPnt2d.hxx>
33 #include <TColgp_Array1OfVec2d.hxx>
34 class Adaptor3d_HSurface;
35 class Adaptor3d_HCurve;
36 class math_Matrix;
37 class gp_Pnt;
38 class gp_Vec;
39 class gp_Vec2d;
40 class gp_Lin;
41 class Blend_Point;
42
43
44 //! Class for a function used to compute a chamfer with constant throat:
45 //! the section of chamfer is right-angled triangle,
46 //! the first of two surfaces (where is the top of the chamfer)
47 //! is virtually moved inside the solid by offset operation,
48 //! the apex of the section is on the intersection curve between moved surface and second surface,
49 //! right angle is at the top of the chamfer,
50 //! the length of the leg from apex to top is constant - it is throat
51 class BlendFunc_ConstThroatWithPenetration  : public BlendFunc_ConstThroat
52 {
53 public:
54
55   DEFINE_STANDARD_ALLOC
56
57   
58   Standard_EXPORT BlendFunc_ConstThroatWithPenetration(const Handle(Adaptor3d_HSurface)& S1,
59                                                        const Handle(Adaptor3d_HSurface)& S2,
60                                                        const Handle(Adaptor3d_HCurve)& C);
61   
62   
63   //! computes the values <F> of the Functions for the
64   //! variable <X>.
65   //! Returns True if the computation was done successfully,
66   //! False otherwise.
67   Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
68   
69   //! returns the values <D> of the derivatives for the
70   //! variable <X>.
71   //! Returns True if the computation was done successfully,
72   //! False otherwise.
73   Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
74   
75   //Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
76   
77   Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
78   
79   //Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
80   
81   //Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
82   
83   //Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
84   
85   Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
86   
87   Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
88   
89   Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
90   
91   Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
92   
93   //! Returns the tangent vector at the section,
94   //! at the beginning and the end of the section, and
95   //! returns the normal (of the surfaces) at
96   //! these points.
97   //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;
98   
99   //! Sets the throat and the "quadrant".
100   //Standard_EXPORT void Set (const Standard_Real theThroat, const Standard_Real, const Standard_Integer Choix) Standard_OVERRIDE;
101   
102   //! Returns the length of the maximum section
103   Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
104
105   
106
107
108
109 protected:
110
111
112
113 private:
114
115
116
117 };
118
119
120
121
122
123
124
125 #endif // _BlendFunc_ConstThroatWithPenetration_HeaderFile