0030480: Visualization - Clear of Select3D_SensitiveGroup does not update internal...
[occt.git] / src / BlendFunc / BlendFunc_ChAsym.hxx
CommitLineData
42cf5bc1 1// Created on: 1998-06-02
2// Created by: Philippe NOUAILLE
3// Copyright (c) 1998-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_ChAsym_HeaderFile
18#define _BlendFunc_ChAsym_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <gp_Vec.hxx>
26#include <gp_Pnt.hxx>
27#include <math_Vector.hxx>
28#include <math_Matrix.hxx>
29#include <Standard_Boolean.hxx>
30#include <gp_Vec2d.hxx>
31#include <Standard_Integer.hxx>
32#include <Blend_Function.hxx>
33#include <TColStd_Array1OfReal.hxx>
34#include <GeomAbs_Shape.hxx>
35#include <TColStd_Array1OfInteger.hxx>
36#include <TColgp_Array1OfPnt.hxx>
37#include <TColgp_Array1OfPnt2d.hxx>
38#include <TColgp_Array1OfVec.hxx>
39#include <TColgp_Array1OfVec2d.hxx>
40class Adaptor3d_HSurface;
41class Adaptor3d_HCurve;
42class math_Matrix;
43class gp_Pnt;
44class gp_Vec;
45class gp_Vec2d;
46class gp_Lin;
47class Blend_Point;
48
49
50
51class BlendFunc_ChAsym : public Blend_Function
52{
53public:
54
55 DEFINE_STANDARD_ALLOC
56
57
58 Standard_EXPORT BlendFunc_ChAsym(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C);
59
60 //! returns the number of equations of the function.
61 Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE;
62
79104795 63 Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
42cf5bc1 64
79104795 65 Standard_EXPORT void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
42cf5bc1 66
79104795 67 Standard_EXPORT void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE;
42cf5bc1 68
79104795 69 Standard_EXPORT void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE;
42cf5bc1 70
79104795 71 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
42cf5bc1 72
73 //! Returns the minimal Distance beetween two
74 //! extremitys of calculed sections.
79104795 75 Standard_EXPORT Standard_Real GetMinimalDistance() const Standard_OVERRIDE;
42cf5bc1 76
77 //! computes the values <F> of the derivatives for the
78 //! variable <X> between DegF and DegL.
79 //! Returns True if the computation was done successfully,
80 //! False otherwise.
81 Standard_EXPORT Standard_Boolean ComputeValues (const math_Vector& X, const Standard_Integer DegF, const Standard_Integer DegL);
82
83 //! computes the values <F> of the Functions for the
84 //! variable <X>.
85 //! Returns True if the computation was done successfully,
86 //! False otherwise.
87 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
88
89 //! returns the values <D> of the derivatives for the
90 //! variable <X>.
91 //! Returns True if the computation was done successfully,
92 //! False otherwise.
93 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
94
95 //! returns the values <F> of the functions and the derivatives
96 //! <D> for the variable <X>.
97 //! Returns True if the computation was done successfully,
98 //! False otherwise.
99 Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE;
100
79104795 101 Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
42cf5bc1 102
79104795 103 Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
42cf5bc1 104
79104795 105 Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
42cf5bc1 106
79104795 107 Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
42cf5bc1 108
79104795 109 Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
42cf5bc1 110
79104795 111 Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
42cf5bc1 112
79104795 113 Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
42cf5bc1 114
115 Standard_EXPORT virtual Standard_Boolean TwistOnS1() const Standard_OVERRIDE;
116
117 Standard_EXPORT virtual Standard_Boolean TwistOnS2() const Standard_OVERRIDE;
118
119 //! Returns the tangent vector at the section,
120 //! at the beginning and the end of the section, and
121 //! returns the normal (of the surfaces) at
122 //! these points.
79104795 123 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 124
125 //! Utile pour une visu rapide et approximative de la surface.
126 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_Lin& C);
127
128 //! Returns if the section is rationnal
79104795 129 Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
42cf5bc1 130
131 //! Returns the length of the maximum section
79104795 132 Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
42cf5bc1 133
134 //! Compute the minimal value of weight for each poles
135 //! of all sections.
79104795 136 Standard_EXPORT void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE;
42cf5bc1 137
138 //! Returns the number of intervals for continuity
139 //! <S>. May be one if Continuity(me) >= <S>
79104795 140 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
42cf5bc1 141
142 //! Stores in <T> the parameters bounding the intervals
143 //! of continuity <S>.
144 //!
145 //! The array must provide enough room to accomodate
146 //! for the parameters. i.e. T.Length() > NbIntervals()
79104795 147 Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
42cf5bc1 148
79104795 149 Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE;
42cf5bc1 150
151 //! Returns the tolerance to reach in approximation
152 //! to respecte
153 //! BoundTol error at the Boundary
154 //! AngleTol tangent error at the Boundary
155 //! SurfTol error inside the surface.
79104795 156 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 157
79104795 158 Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE;
42cf5bc1 159
79104795 160 Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE;
42cf5bc1 161
79104795 162 Standard_EXPORT void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE;
42cf5bc1 163
164 //! Used for the first and last section
165 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;
166
167 //! Used for the first and last section
168 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;
169
79104795 170 Standard_EXPORT void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE;
42cf5bc1 171
172 //! Sets the distances and the angle.
173 Standard_EXPORT void Set (const Standard_Real Dist1, const Standard_Real Angle, const Standard_Integer Choix);
174
175
176
177
178protected:
179
180
181
182
183
184private:
185
186
187
188 Handle(Adaptor3d_HSurface) surf1;
189 Handle(Adaptor3d_HSurface) surf2;
190 Handle(Adaptor3d_HCurve) curv;
191 Handle(Adaptor3d_HCurve) tcurv;
192 Standard_Real param;
193 Standard_Real dist1;
194 Standard_Real angle;
195 Standard_Real tgang;
196 gp_Vec nplan;
197 gp_Pnt pt1;
198 gp_Vec tsurf1;
199 gp_Pnt pt2;
200 math_Vector FX;
201 math_Matrix DX;
202 Standard_Boolean istangent;
203 gp_Vec tg1;
204 gp_Vec2d tg12d;
205 gp_Vec tg2;
206 gp_Vec2d tg22d;
207 Standard_Integer choix;
208 Standard_Real distmin;
209
210
211};
212
213
214
215
216
217
218
219#endif // _BlendFunc_ChAsym_HeaderFile