0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSu...
[occt.git] / src / BlendFunc / BlendFunc_ConstThroat.hxx
CommitLineData
1d54b807 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_ConstThroat_HeaderFile
16#define _BlendFunc_ConstThroat_HeaderFile
17
c22b52d6 18#include <Adaptor3d_Surface.hxx>
1d54b807 19#include <BlendFunc_GenChamfer.hxx>
1d54b807 20#include <math_Vector.hxx>
21#include <TColStd_Array1OfReal.hxx>
22#include <GeomAbs_Shape.hxx>
23#include <TColStd_Array1OfInteger.hxx>
24#include <TColgp_Array1OfPnt.hxx>
25#include <TColgp_Array1OfVec.hxx>
26#include <TColgp_Array1OfPnt2d.hxx>
27#include <TColgp_Array1OfVec2d.hxx>
c22b52d6 28
1d54b807 29class math_Matrix;
1d54b807 30class gp_Lin;
31class Blend_Point;
32
1d54b807 33//! Class for a function used to compute a symmetric chamfer
34//! with constant throat that is the height of isosceles triangle in section
35class BlendFunc_ConstThroat : public BlendFunc_GenChamfer
36{
37public:
38
39 DEFINE_STANDARD_ALLOC
40
41
c22b52d6 42 Standard_EXPORT BlendFunc_ConstThroat(const Handle(Adaptor3d_Surface)& S1,
43 const Handle(Adaptor3d_Surface)& S2,
44 const Handle(Adaptor3d_Curve)& C);
1d54b807 45
46
47 //! computes the values <F> of the Functions for the
48 //! variable <X>.
49 //! Returns True if the computation was done successfully,
50 //! False otherwise.
51 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
52
53 //! returns the values <D> of the derivatives for the
54 //! variable <X>.
55 //! Returns True if the computation was done successfully,
56 //! False otherwise.
57 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
58
59 Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
60
61 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
62
63 Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
64
65 Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
66
67 Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
68
69 Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
70
71 Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
72
73 Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
74
75 Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
76
77 //! Returns the tangent vector at the section,
78 //! at the beginning and the end of the section, and
79 //! returns the normal (of the surfaces) at
80 //! these points.
81 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;
82
83 //! Sets the throat and the "quadrant".
84 Standard_EXPORT void Set (const Standard_Real aThroat, const Standard_Real, const Standard_Integer Choix) Standard_OVERRIDE;
85
86 //! Returns the length of the maximum section
87 Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
88
89
90
91
92
93protected:
94
95 gp_Pnt pts1;
96 gp_Pnt pts2;
97 gp_Vec d1u1;
98 gp_Vec d1v1;
99 gp_Vec d1u2;
100 gp_Vec d1v2;
101 Standard_Boolean istangent;
102 gp_Vec tg1;
103 gp_Vec2d tg12d;
104 gp_Vec tg2;
105 gp_Vec2d tg22d;
106 Standard_Real param;
107 Standard_Real Throat;
108
109 gp_Pnt ptgui;
110 gp_Vec nplan;
111 Standard_Real normtg;
112 Standard_Real theD;
113 gp_Vec d1gui;
114 gp_Vec d2gui;
115
116private:
117
118
119};
120
121
122
123
124
125
126
127#endif // _BlendFunc_ConstThroat_HeaderFile