0032951: Coding - get rid of unused headers [GeomConvert to IGESBasic]
[occt.git] / src / GeomFill / GeomFill_DiscreteTrihedron.hxx
1 // Created on: 2013-02-05
2 // Created by: Julia GERASIMOVA
3 // Copyright (c) 2001-2013 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _GeomFill_DiscreteTrihedron_HeaderFile
17 #define _GeomFill_DiscreteTrihedron_HeaderFile
18
19 #include <Standard.hxx>
20
21 #include <GeomFill_HSequenceOfAx2.hxx>
22 #include <TColStd_HSequenceOfReal.hxx>
23 #include <GeomFill_TrihedronLaw.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Integer.hxx>
26 #include <GeomAbs_Shape.hxx>
27 #include <TColStd_Array1OfReal.hxx>
28 class GeomFill_Frenet;
29 class gp_Vec;
30
31
32 class GeomFill_DiscreteTrihedron;
33 DEFINE_STANDARD_HANDLE(GeomFill_DiscreteTrihedron, GeomFill_TrihedronLaw)
34
35 //! Defined Discrete Trihedron Law.
36 //! The requirement for path curve is only G1.
37 //! The result is C0-continuous surface
38 //! that can be later approximated to C1.
39 class GeomFill_DiscreteTrihedron : public GeomFill_TrihedronLaw
40 {
41
42 public:
43
44   
45   Standard_EXPORT GeomFill_DiscreteTrihedron();
46   
47   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
48   
49   Standard_EXPORT void Init();
50   
51   //! initialize curve of trihedron law
52   //! @return Standard_True in case if execution end correctly
53   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
54   
55   //! compute Trihedron on curve at parameter <Param>
56   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
57   
58   //! compute Trihedron and  derivative Trihedron  on curve
59   //! at parameter <Param>
60   //! Warning : It used only for C1 or C2 approximation
61   //! For the moment it returns null values for DTangent, DNormal
62   //! and DBiNormal.
63   Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
64   
65   //! compute  Trihedron on curve
66   //! first and seconde  derivatives.
67   //! Warning : It used only for C2 approximation
68   //! For the moment it returns null values for DTangent, DNormal
69   //! DBiNormal, D2Tangent, D2Normal, D2BiNormal.
70   Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
71   
72   //! Returns  the number  of  intervals for  continuity
73   //! <S>.
74   //! May be one if Continuity(me) >= <S>
75   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
76   
77   //! Stores in <T> the  parameters bounding the intervals
78   //! of continuity <S>.
79   //!
80   //! The array must provide  enough room to  accommodate
81   //! for the parameters. i.e. T.Length() > NbIntervals()
82   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
83   
84   //! Get average value of Tangent(t) and Normal(t) it is usful to
85   //! make fast approximation of rational  surfaces.
86   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
87   
88   //! Say if the law is Constant.
89   Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
90   
91   //! Return True.
92   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
93
94
95
96
97   DEFINE_STANDARD_RTTIEXT(GeomFill_DiscreteTrihedron,GeomFill_TrihedronLaw)
98
99 protected:
100
101
102
103
104 private:
105
106
107   gp_Pnt myPoint;
108   Handle(GeomFill_HSequenceOfAx2) myTrihedrons;
109   Handle(TColStd_HSequenceOfReal) myKnots;
110   Handle(GeomFill_Frenet) myFrenet;
111   Standard_Boolean myUseFrenet;
112
113
114 };
115
116
117
118
119
120
121
122 #endif // _GeomFill_DiscreteTrihedron_HeaderFile