42cf5bc1 |
1 | // Created on: 1998-05-05 |
2 | // Created by: Stepan MISHIN |
3 | // Copyright (c) 1998-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 _Geom_OsculatingSurface_HeaderFile |
18 | #define _Geom_OsculatingSurface_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | #include <Geom_HSequenceOfBSplineSurface.hxx> |
26 | #include <TColStd_HSequenceOfInteger.hxx> |
27 | #include <TColStd_Array1OfBoolean.hxx> |
28 | #include <Standard_Boolean.hxx> |
29 | #include <Standard_Integer.hxx> |
30 | #include <GeomAbs_IsoType.hxx> |
31 | #include <Geom_SequenceOfBSplineSurface.hxx> |
32 | class Geom_Surface; |
33 | class Geom_BSplineSurface; |
34 | |
35 | |
6b84c3f7 |
36 | class Geom_OsculatingSurface; |
25e59720 |
37 | DEFINE_STANDARD_HANDLE(Geom_OsculatingSurface, Standard_Transient) |
42cf5bc1 |
38 | |
25e59720 |
39 | class Geom_OsculatingSurface : public Standard_Transient |
42cf5bc1 |
40 | { |
41 | public: |
42 | |
43 | DEFINE_STANDARD_ALLOC |
44 | |
45 | |
46 | Standard_EXPORT Geom_OsculatingSurface(); |
47 | |
48 | //! detects if the surface has punctual U or V |
49 | //! isoparametric curve along on the bounds of the surface |
21c7c457 |
50 | //! relatively to the tolerance Tol and Builds the corresponding |
42cf5bc1 |
51 | //! osculating surfaces. |
52 | Standard_EXPORT Geom_OsculatingSurface(const Handle(Geom_Surface)& BS, const Standard_Real Tol); |
53 | |
54 | Standard_EXPORT void Init (const Handle(Geom_Surface)& BS, const Standard_Real Tol); |
55 | |
56 | Standard_EXPORT Handle(Geom_Surface) BasisSurface() const; |
57 | |
58 | Standard_EXPORT Standard_Real Tolerance() const; |
59 | |
60 | //! if Standard_True, L is the local osculating surface |
61 | //! along U at the point U,V. |
62 | Standard_EXPORT Standard_Boolean UOscSurf (const Standard_Real U, const Standard_Real V, Standard_Boolean& t, Handle(Geom_BSplineSurface)& L) const; |
63 | |
64 | //! if Standard_True, L is the local osculating surface |
65 | //! along V at the point U,V. |
66 | Standard_EXPORT Standard_Boolean VOscSurf (const Standard_Real U, const Standard_Real V, Standard_Boolean& t, Handle(Geom_BSplineSurface)& L) const; |
67 | |
bc73b006 |
68 | //! Dumps the content of me into the stream |
69 | Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; |
70 | |
42cf5bc1 |
71 | |
25e59720 |
72 | DEFINE_STANDARD_RTTIEXT(Geom_OsculatingSurface,Standard_Transient) |
42cf5bc1 |
73 | |
74 | protected: |
75 | |
76 | |
77 | |
78 | |
79 | |
80 | private: |
81 | |
82 | |
83 | //! returns False if the osculating surface can't be built |
84 | Standard_EXPORT Standard_Boolean BuildOsculatingSurface (const Standard_Real Param, const Standard_Integer UKnot, const Standard_Integer VKnot, const Handle(Geom_BSplineSurface)& BS, Handle(Geom_BSplineSurface)& L) const; |
85 | |
86 | //! returns True if the isoparametric is |
87 | //! quasi-punctual |
88 | Standard_EXPORT Standard_Boolean IsQPunctual (const Handle(Geom_Surface)& S, const Standard_Real Param, const GeomAbs_IsoType IT, const Standard_Real TolMin, const Standard_Real TolMax) const; |
89 | |
90 | Standard_EXPORT Standard_Boolean HasOscSurf() const; |
91 | |
92 | Standard_EXPORT Standard_Boolean IsAlongU() const; |
93 | |
94 | Standard_EXPORT Standard_Boolean IsAlongV() const; |
95 | |
96 | Standard_EXPORT void ClearOsculFlags(); |
97 | |
98 | Standard_EXPORT const Geom_SequenceOfBSplineSurface& GetSeqOfL1() const; |
99 | |
100 | Standard_EXPORT const Geom_SequenceOfBSplineSurface& GetSeqOfL2() const; |
101 | |
102 | |
103 | Handle(Geom_Surface) myBasisSurf; |
104 | Standard_Real myTol; |
105 | Handle(Geom_HSequenceOfBSplineSurface) myOsculSurf1; |
106 | Handle(Geom_HSequenceOfBSplineSurface) myOsculSurf2; |
107 | Handle(TColStd_HSequenceOfInteger) myKdeg; |
108 | TColStd_Array1OfBoolean myAlong; |
109 | |
110 | |
111 | }; |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | |
119 | #endif // _Geom_OsculatingSurface_HeaderFile |