0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BlendFunc / BlendFunc_Chamfer.hxx
CommitLineData
42cf5bc1 1// Created on: 1996-06-06
2// Created by: Stagiaire Xuan Trang PHAMPHU
3// Copyright (c) 1996-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_Chamfer_HeaderFile
18#define _BlendFunc_Chamfer_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Integer.hxx>
25#include <Standard_Real.hxx>
26#include <BlendFunc_Corde.hxx>
1d54b807 27#include <BlendFunc_GenChamfer.hxx>
42cf5bc1 28#include <Standard_Boolean.hxx>
29#include <math_Vector.hxx>
30#include <TColStd_Array1OfReal.hxx>
31#include <GeomAbs_Shape.hxx>
32#include <TColStd_Array1OfInteger.hxx>
33#include <TColgp_Array1OfPnt.hxx>
34#include <TColgp_Array1OfVec.hxx>
35#include <TColgp_Array1OfPnt2d.hxx>
36#include <TColgp_Array1OfVec2d.hxx>
37class Adaptor3d_HSurface;
38class Adaptor3d_HCurve;
39class math_Matrix;
40class gp_Pnt;
41class gp_Vec;
42class gp_Vec2d;
43class gp_Lin;
44class Blend_Point;
45
46
47
1d54b807 48//! Class for a function used to compute a "ordinary" chamfer:
49//! when distances from spine to surfaces are constant
50class BlendFunc_Chamfer : public BlendFunc_GenChamfer
42cf5bc1 51{
52public:
53
54 DEFINE_STANDARD_ALLOC
55
56
57 Standard_EXPORT BlendFunc_Chamfer(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& CG);
58
42cf5bc1 59 //! computes the values <F> of the Functions for the
60 //! variable <X>.
61 //! Returns True if the computation was done successfully,
62 //! False otherwise.
63 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
64
65 //! returns the values <D> of the derivatives for the
66 //! variable <X>.
67 //! Returns True if the computation was done successfully,
68 //! False otherwise.
69 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
70
79104795 71 Standard_EXPORT void Set (const Standard_Real Param) Standard_OVERRIDE;
42cf5bc1 72
79104795 73 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE;
42cf5bc1 74
79104795 75 Standard_EXPORT const gp_Pnt& PointOnS1() const Standard_OVERRIDE;
42cf5bc1 76
79104795 77 Standard_EXPORT const gp_Pnt& PointOnS2() const Standard_OVERRIDE;
42cf5bc1 78
79104795 79 Standard_EXPORT Standard_Boolean IsTangencyPoint() const Standard_OVERRIDE;
42cf5bc1 80
79104795 81 Standard_EXPORT const gp_Vec& TangentOnS1() const Standard_OVERRIDE;
42cf5bc1 82
79104795 83 Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const Standard_OVERRIDE;
42cf5bc1 84
79104795 85 Standard_EXPORT const gp_Vec& TangentOnS2() const Standard_OVERRIDE;
42cf5bc1 86
79104795 87 Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const Standard_OVERRIDE;
42cf5bc1 88
89 //! Returns the tangent vector at the section,
90 //! at the beginning and the end of the section, and
91 //! returns the normal (of the surfaces) at
92 //! these points.
79104795 93 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 94
95 //! Sets the distances and the "quadrant".
1d54b807 96 Standard_EXPORT void Set (const Standard_Real Dist1, const Standard_Real Dist2, const Standard_Integer Choix) Standard_OVERRIDE;
42cf5bc1 97
98 //! Returns the length of the maximum section
79104795 99 Standard_EXPORT Standard_Real GetSectionSize() const Standard_OVERRIDE;
42cf5bc1 100
42cf5bc1 101
102
103
104
105protected:
106
107
108
109
110
111private:
112
113
42cf5bc1 114 BlendFunc_Corde corde1;
115 BlendFunc_Corde corde2;
116
117
118};
119
120
121
122
123
124
125
126#endif // _BlendFunc_Chamfer_HeaderFile