0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override]
[occt.git] / src / Blend / Blend_CSFunction.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-09-13
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 _Blend_CSFunction_HeaderFile
18#define _Blend_CSFunction_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Blend_AppFunction.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Boolean.hxx>
27#include <math_Vector.hxx>
28#include <Standard_Real.hxx>
29#include <TColStd_Array1OfReal.hxx>
30#include <TColStd_Array1OfInteger.hxx>
31#include <TColgp_Array1OfPnt.hxx>
32#include <TColgp_Array1OfVec.hxx>
33#include <TColgp_Array1OfPnt2d.hxx>
34#include <TColgp_Array1OfVec2d.hxx>
35class Standard_DomainError;
36class math_Matrix;
37class gp_Pnt;
38class gp_Pnt2d;
39class gp_Vec;
40class gp_Vec2d;
41class Blend_Point;
42
43
44//! Deferred class for a function used to compute a blending
45//! surface between a surface and a curve, using a guide line.
46//! The vector <X> used in Value, Values and Derivatives methods
47//! may be the vector of the parametric coordinates U,V,
48//! W of the extremities of a section on the surface and
49//! the curve.
50class Blend_CSFunction : public Blend_AppFunction
51{
52public:
53
54 DEFINE_STANDARD_ALLOC
55
56
57 //! Returns 3 (default value). Can be redefined.
79104795 58 Standard_EXPORT virtual Standard_Integer NbVariables() const Standard_OVERRIDE;
42cf5bc1 59
60 //! returns the number of equations of the function.
79104795 61 Standard_EXPORT virtual Standard_Integer NbEquations() const Standard_OVERRIDE = 0;
42cf5bc1 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.
79104795 67 Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE = 0;
42cf5bc1 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.
79104795 73 Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE = 0;
42cf5bc1 74
75 //! returns the values <F> of the functions and the derivatives
76 //! <D> for the variable <X>.
77 //! Returns True if the computation was done successfully,
78 //! False otherwise.
79104795 79 Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE = 0;
42cf5bc1 80
81 //! Sets the value of the parameter along the guide line.
82 //! This determines the plane in which the solution has
83 //! to be found.
79104795 84 Standard_EXPORT virtual void Set (const Standard_Real Param) Standard_OVERRIDE = 0;
42cf5bc1 85
86 //! Sets the bounds of the parametric interval on
87 //! the guide line.
88 //! This determines the derivatives in these values if the
89 //! function is not Cn.
79104795 90 Standard_EXPORT virtual void Set (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE = 0;
42cf5bc1 91
92 //! Returns in the vector Tolerance the parametric tolerance
93 //! for each of the 3 variables;
94 //! Tol is the tolerance used in 3d space.
79104795 95 Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const Standard_OVERRIDE = 0;
42cf5bc1 96
97 //! Returns in the vector InfBound the lowest values allowed
98 //! for each of the 3 variables.
99 //! Returns in the vector SupBound the greatest values allowed
100 //! for each of the 3 variables.
79104795 101 Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const Standard_OVERRIDE = 0;
42cf5bc1 102
103 //! Returns Standard_True if Sol is a zero of the function.
104 //! Tol is the tolerance used in 3d space.
105 //! The computation is made at the current value of
106 //! the parameter on the guide line.
79104795 107 Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE = 0;
42cf5bc1 108
109 //! Returns the minimal Distance beetween two
110 //! extremitys of calculed sections.
111 Standard_EXPORT virtual Standard_Real GetMinimalDistance() const Standard_OVERRIDE;
112
113 //! Returns the point on the first support.
114 Standard_EXPORT const gp_Pnt& Pnt1() const Standard_OVERRIDE;
115
116 //! Returns the point on the seconde support.
117 Standard_EXPORT const gp_Pnt& Pnt2() const Standard_OVERRIDE;
118
119 //! Returns the point on the surface.
120 Standard_EXPORT virtual const gp_Pnt& PointOnS() const = 0;
121
122 //! Returns the point on the curve.
123 Standard_EXPORT virtual const gp_Pnt& PointOnC() const = 0;
124
125 //! Returns U,V coordinates of the point on the surface.
126 Standard_EXPORT virtual const gp_Pnt2d& Pnt2d() const = 0;
127
128 //! Returns parameter of the point on the curve.
129 Standard_EXPORT virtual Standard_Real ParameterOnC() const = 0;
130
131 //! Returns True when it is not possible to compute
132 //! the tangent vectors at PointOnS and/or PointOnC.
133 Standard_EXPORT virtual Standard_Boolean IsTangencyPoint() const = 0;
134
135 //! Returns the tangent vector at PointOnS, in 3d space.
136 Standard_EXPORT virtual const gp_Vec& TangentOnS() const = 0;
137
138 //! Returns the tangent vector at PointOnS, in the
139 //! parametric space of the first surface.
140 Standard_EXPORT virtual const gp_Vec2d& Tangent2d() const = 0;
141
142 //! Returns the tangent vector at PointOnC, in 3d space.
143 Standard_EXPORT virtual const gp_Vec& TangentOnC() const = 0;
144
145 //! Returns the tangent vector at the section,
146 //! at the beginning and the end of the section, and
147 //! returns the normal (of the surfaces) at
148 //! these points.
149 Standard_EXPORT virtual void Tangent (const Standard_Real U, const Standard_Real V, gp_Vec& TgS, gp_Vec& NormS) const = 0;
150
79104795 151 Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE = 0;
42cf5bc1 152
153 //! Returns the tolerance to reach in approximation
154 //! to respecte
155 //! BoundTol error at the Boundary
156 //! AngleTol tangent error at the Boundary
157 //! SurfTol error inside the surface.
79104795 158 Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const Standard_OVERRIDE = 0;
42cf5bc1 159
79104795 160 Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) Standard_OVERRIDE = 0;
42cf5bc1 161
79104795 162 Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) Standard_OVERRIDE = 0;
42cf5bc1 163
164 //! Used for the first and last section
165 //! The method returns Standard_True if the derivatives
166 //! are computed, otherwise it returns Standard_False.
79104795 167 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 = 0;
42cf5bc1 168
79104795 169 Standard_EXPORT virtual void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE = 0;
42cf5bc1 170
171 //! Used for the first and last section
172 //! The method returns Standard_True if the derivatives
173 //! are computed, otherwise it returns Standard_False.
174 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;
175
176
177
178
179protected:
180
181
182
183
184
185private:
186
187
188
189
190
191};
192
193
194
195
196
197
198
199#endif // _Blend_CSFunction_HeaderFile