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