0031939: Coding - correction of spelling errors in comments [part 3]
[occt.git] / src / GeomFill / GeomFill_Frenet.hxx
1 // Created on: 1997-12-19
2 // Created by: Philippe MANGIN
3 // Copyright (c) 1997-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 _GeomFill_Frenet_HeaderFile
18 #define _GeomFill_Frenet_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <gp_Pnt.hxx>
24 #include <TColStd_HArray1OfReal.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <GeomFill_TrihedronLaw.hxx>
27 #include <Standard_Real.hxx>
28 #include <Standard_Integer.hxx>
29 #include <GeomAbs_Shape.hxx>
30 #include <TColStd_Array1OfReal.hxx>
31 class Standard_OutOfRange;
32 class Standard_ConstructionError;
33 class GeomFill_TrihedronLaw;
34 class gp_Vec;
35
36
37 class GeomFill_Frenet;
38 DEFINE_STANDARD_HANDLE(GeomFill_Frenet, GeomFill_TrihedronLaw)
39
40 //! Defined Frenet Trihedron  Law
41 class GeomFill_Frenet : public GeomFill_TrihedronLaw
42 {
43
44 public:
45
46   
47   Standard_EXPORT GeomFill_Frenet();
48   
49   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
50   
51   Standard_EXPORT void Init();
52   
53   Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
54   
55   //! compute Triedrhon 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 Triedrhon and  derivative Trihedron  on curve
59   //! at parameter <Param>
60   //! Warning : It used only for C1 or C2 approximation
61   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;
62   
63   //! compute  Trihedron on curve
64   //! first and seconde  derivatives.
65   //! Warning : It used only for C2 approximation
66   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;
67   
68   //! Returns  the number  of  intervals for  continuity
69   //! <S>.
70   //! May be one if Continuity(me) >= <S>
71   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
72   
73   //! Stores in <T> the  parameters bounding the intervals
74   //! of continuity <S>.
75   //!
76   //! The array must provide  enough room to  accommodate
77   //! for the parameters. i.e. T.Length() > NbIntervals()
78   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
79   
80   //! Get average value of Tangent(t) and Normal(t) it is usfull to
81   //! make fast approximation of rational  surfaces.
82   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
83   
84   //! Say if the law is Constant.
85   Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
86   
87   //! Return True.
88   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
89
90
91
92
93   DEFINE_STANDARD_RTTIEXT(GeomFill_Frenet,GeomFill_TrihedronLaw)
94
95 protected:
96
97
98
99
100 private:
101
102   
103   Standard_EXPORT Standard_Boolean IsSingular (const Standard_Real U, Standard_Integer& Index) const;
104   
105   Standard_EXPORT Standard_Boolean DoSingular (const Standard_Real U, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& BiNormal, Standard_Integer& n, Standard_Integer& k, Standard_Integer& TFlag, Standard_Integer& BNFlag, Standard_Real& Delta);
106   
107   //! computes Triedrhon on curve at parameter <Param>
108   Standard_EXPORT Standard_Boolean SingularD0 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal, Standard_Real& Delta);
109   
110   //! computes Triedrhon and  derivative Trihedron  on curve
111   //! at parameter <Param>
112   //! Warning : It used only for C1 or C2 approximation
113   Standard_EXPORT Standard_Boolean SingularD1 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal, Standard_Real& Delta);
114   
115   //! computes  Trihedron on curve
116   //! first and seconde  derivatives.
117   //! Warning : It used only for C2 approximation
118   Standard_EXPORT Standard_Boolean SingularD2 (const Standard_Real Param, const Standard_Integer Index, 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_Real& Delta);
119   
120   //! revolves the trihedron (which is determined
121   //! of given "Tangent", "Normal" and "BiNormal" vectors)
122   //! to coincide "Tangent" and "NewTangent" axes.
123   Standard_EXPORT Standard_Boolean RotateTrihedron (gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal, const gp_Vec& NewTangent) const;
124
125   gp_Pnt P;
126   Handle(TColStd_HArray1OfReal) mySngl;
127   Handle(TColStd_HArray1OfReal) mySnglLen;
128   Standard_Boolean isSngl;
129
130
131 };
132
133
134
135
136
137
138
139 #endif // _GeomFill_Frenet_HeaderFile