0032751: Coding - get rid of unused headers [AppStd to BndLib]
[occt.git] / src / BlendFunc / BlendFunc_EvolRad.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-12-20
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_EvolRad_HeaderFile
18#define _BlendFunc_EvolRad_HeaderFile
19
c22b52d6 20#include <Adaptor3d_Surface.hxx>
42cf5bc1 21#include <gp_Pnt.hxx>
42cf5bc1 22#include <gp_Vec.hxx>
23#include <gp_Vec2d.hxx>
42cf5bc1 24#include <math_Matrix.hxx>
25#include <BlendFunc_Tensor.hxx>
26#include <BlendFunc_SectionShape.hxx>
27#include <Convert_ParameterisationType.hxx>
28#include <Blend_Function.hxx>
29#include <TColStd_Array1OfReal.hxx>
30#include <GeomAbs_Shape.hxx>
31#include <TColStd_Array1OfInteger.hxx>
32#include <TColgp_Array1OfPnt.hxx>
33#include <TColgp_Array1OfVec.hxx>
34#include <TColgp_Array1OfPnt2d.hxx>
35#include <TColgp_Array1OfVec2d.hxx>
c22b52d6 36
42cf5bc1 37class Law_Function;
42cf5bc1 38class gp_Circ;
39class Blend_Point;
40
42cf5bc1 41class BlendFunc_EvolRad : public Blend_Function
42{
43public:
44
45 DEFINE_STANDARD_ALLOC
46
47
c22b52d6 48 Standard_EXPORT BlendFunc_EvolRad(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_Curve)& C, const Handle(Law_Function)& Law);
42cf5bc1 49
50 //! returns the number of equations of the function.
51 Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE;
52
53 //! computes the values <F> of the Functions for the
54 //! variable <X>.
55 //! Returns True if the computation was done successfully,
56 //! False otherwise.
57 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
58
59 //! returns the values <D> of the derivatives for the
60 //! variable <X>.
61 //! Returns True if the computation was done successfully,
62 //! False otherwise.
63 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
64
65 //! returns the values <F> of the functions and the derivatives
66 //! <D> for the variable <X>.
67 //! Returns True if the computation was done successfully,
68 //! False otherwise.
69 Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE;
70
79104795 71 Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
42cf5bc1 72
79104795 73 Standard_EXPORT void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
42cf5bc1 74
79104795 75 Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE;
42cf5bc1 76
79104795 77 Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE;
42cf5bc1 78
79104795 79 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
42cf5bc1 80
21c7c457 81 //! Returns the minimal Distance between two
82 //! extremities of calculated sections.
79104795 83 Standard_EXPORT Standard_Real GetMinimalDistance() const Standard_OVERRIDE;
42cf5bc1 84
79104795 85 Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
42cf5bc1 86
79104795 87 Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
42cf5bc1 88
79104795 89 Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
42cf5bc1 90
79104795 91 Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
42cf5bc1 92
79104795 93 Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
42cf5bc1 94
79104795 95 Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
42cf5bc1 96
79104795 97 Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
42cf5bc1 98
99 //! Returns the tangent vector at the section,
100 //! at the beginning and the end of the section, and
101 //! returns the normal (of the surfaces) at
102 //! these points.
79104795 103 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;
42cf5bc1 104
105 Standard_EXPORT virtual Standard_Boolean TwistOnS1() const Standard_OVERRIDE;
106
107 Standard_EXPORT virtual Standard_Boolean TwistOnS2() const Standard_OVERRIDE;
108
109 Standard_EXPORT void Set (const Standard_Integer Choix);
110
111 //! Sets the type of section generation for the
112 //! approximations.
113 Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection);
114
115 //! Method for graphic traces
116 Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C);
117
118 //! Returns if the section is rationnal
79104795 119 Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
42cf5bc1 120
121 //! Returns the length of the maximum section
79104795 122 Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
42cf5bc1 123
124 //! Compute the minimal value of weight for each poles
125 //! of all sections.
79104795 126 Standard_EXPORT void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE;
42cf5bc1 127
128 //! Returns the number of intervals for continuity
129 //! <S>. May be one if Continuity(me) >= <S>
79104795 130 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
42cf5bc1 131
132 //! Stores in <T> the parameters bounding the intervals
133 //! of continuity <S>.
134 //!
21c7c457 135 //! The array must provide enough room to accommodate
42cf5bc1 136 //! for the parameters. i.e. T.Length() > NbIntervals()
79104795 137 Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
42cf5bc1 138
79104795 139 Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
42cf5bc1 140
141 //! Returns the tolerance to reach in approximation
142 //! to respecte
143 //! BoundTol error at the Boundary
144 //! AngleTol tangent error at the Boundary
145 //! SurfTol error inside the surface.
79104795 146 Standard_EXPORT void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const Standard_OVERRIDE;
42cf5bc1 147
79104795 148 Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE;
42cf5bc1 149
79104795 150 Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE;
42cf5bc1 151
152 //! Used for the first and last section
153 Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
154
155 //! Used for the first and last section
156 Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE;
157
79104795 158 Standard_EXPORT void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE;
42cf5bc1 159
79104795 160 Standard_EXPORT void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE;
42cf5bc1 161
162
163
164
165protected:
166
167
168
169
170
171private:
172
173
174 Standard_EXPORT Standard_Boolean ComputeValues (const math_Vector& X, const Standard_Integer Order, const Standard_Boolean ByParam = Standard_False, const Standard_Real Param = 0);
175
176
c22b52d6 177 Handle(Adaptor3d_Surface) surf1;
178 Handle(Adaptor3d_Surface) surf2;
179 Handle(Adaptor3d_Curve) curv;
180 Handle(Adaptor3d_Curve) tcurv;
42cf5bc1 181 Handle(Law_Function) fevol;
182 Handle(Law_Function) tevol;
183 gp_Pnt pts1;
184 gp_Pnt pts2;
185 Standard_Boolean istangent;
186 gp_Vec tg1;
187 gp_Vec2d tg12d;
188 gp_Vec tg2;
189 gp_Vec2d tg22d;
190 Standard_Real param;
191 Standard_Real sg1;
192 Standard_Real sg2;
193 Standard_Real ray;
194 Standard_Real dray;
195 Standard_Real d2ray;
196 Standard_Integer choix;
197 Standard_Integer myXOrder;
198 Standard_Integer myTOrder;
199 math_Vector xval;
200 Standard_Real tval;
201 gp_Vec d1u1;
202 gp_Vec d1u2;
203 gp_Vec d1v1;
204 gp_Vec d1v2;
205 gp_Vec d2u1;
206 gp_Vec d2v1;
207 gp_Vec d2uv1;
208 gp_Vec d2u2;
209 gp_Vec d2v2;
210 gp_Vec d2uv2;
211 gp_Vec dn1w;
212 gp_Vec dn2w;
213 gp_Vec d2n1w;
214 gp_Vec d2n2w;
215 gp_Vec nplan;
216 gp_Vec nsurf1;
217 gp_Vec nsurf2;
218 gp_Vec dns1u1;
219 gp_Vec dns1u2;
220 gp_Vec dns1v1;
221 gp_Vec dns1v2;
222 gp_Vec dnplan;
223 gp_Vec d2nplan;
224 gp_Vec dnsurf1;
225 gp_Vec dnsurf2;
226 gp_Vec dndu1;
227 gp_Vec dndu2;
228 gp_Vec dndv1;
229 gp_Vec dndv2;
230 gp_Vec d2ndu1;
231 gp_Vec d2ndu2;
232 gp_Vec d2ndv1;
233 gp_Vec d2ndv2;
234 gp_Vec d2nduv1;
235 gp_Vec d2nduv2;
236 gp_Vec d2ndtu1;
237 gp_Vec d2ndtu2;
238 gp_Vec d2ndtv1;
239 gp_Vec d2ndtv2;
240 math_Vector E;
241 math_Matrix DEDX;
242 math_Vector DEDT;
243 BlendFunc_Tensor D2EDX2;
244 math_Matrix D2EDXDT;
245 math_Vector D2EDT2;
246 Standard_Real minang;
247 Standard_Real maxang;
248 Standard_Real lengthmin;
249 Standard_Real lengthmax;
250 Standard_Real distmin;
251 BlendFunc_SectionShape mySShape;
252 Convert_ParameterisationType myTConv;
253
254
255};
256
257
258
259
260
261
262
263#endif // _BlendFunc_EvolRad_HeaderFile