0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / Contap / Contap_Contour.hxx
1 // Created on: 1993-02-05
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-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 _Contap_Contour_HeaderFile
18 #define _Contap_Contour_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <Contap_TheSequenceOfLine.hxx>
26 #include <Contap_TheSearch.hxx>
27 #include <Contap_TheSearchInside.hxx>
28 #include <Contap_SurfFunction.hxx>
29 #include <Contap_ArcFunction.hxx>
30 #include <Standard_Real.hxx>
31 #include <Standard_Integer.hxx>
32 class StdFail_NotDone;
33 class Standard_OutOfRange;
34 class Standard_ConstructionError;
35 class gp_Vec;
36 class gp_Pnt;
37 class Adaptor3d_HSurface;
38 class Adaptor3d_TopolTool;
39 class Contap_Line;
40 class Contap_SurfFunction;
41
42
43
44 class Contap_Contour 
45 {
46 public:
47
48   DEFINE_STANDARD_ALLOC
49
50   
51   Standard_EXPORT Contap_Contour();
52   
53   Standard_EXPORT Contap_Contour(const gp_Vec& Direction);
54   
55   Standard_EXPORT Contap_Contour(const gp_Vec& Direction, const Standard_Real Angle);
56   
57   Standard_EXPORT Contap_Contour(const gp_Pnt& Eye);
58   
59   //! Creates the contour in a given direction.
60   Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction);
61   
62   //! Creates the contour in a given direction.
63   Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle);
64   
65   //! Creates the contour for a perspective view.
66   Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye);
67   
68   //! Creates the contour in a given direction.
69   Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain);
70   
71   //! Creates the contour in a given direction.
72   Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction);
73   
74   //! Creates the contour in a given direction.
75   Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle);
76   
77   //! Creates the contour for a perspective view.
78   Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye);
79   
80   Standard_EXPORT void Init (const gp_Vec& Direction);
81   
82   Standard_EXPORT void Init (const gp_Vec& Direction, const Standard_Real Angle);
83   
84   Standard_EXPORT void Init (const gp_Pnt& Eye);
85   
86     Standard_Boolean IsDone() const;
87   
88   //! Returns true if the is no line.
89     Standard_Boolean IsEmpty() const;
90   
91     Standard_Integer NbLines() const;
92   
93     const Contap_Line& Line (const Standard_Integer Index) const;
94   
95   //! Returns    a     reference   on     the   internal
96   //! SurfaceFunction.  This is used to compute tangents
97   //! on the lines.
98     Contap_SurfFunction& SurfaceFunction();
99
100
101
102
103 protected:
104
105
106
107
108
109 private:
110
111   
112   Standard_EXPORT void Perform (const Handle(Adaptor3d_TopolTool)& Domain);
113   
114   Standard_EXPORT void PerformAna (const Handle(Adaptor3d_TopolTool)& Domain);
115
116
117   Standard_Boolean done;
118   Contap_TheSequenceOfLine slin;
119   Contap_TheSearch solrst;
120   Contap_TheSearchInside solins;
121   Contap_SurfFunction mySFunc;
122   Contap_ArcFunction myAFunc;
123   Standard_Boolean modeset;
124
125
126 };
127
128
129 #include <Contap_Contour.lxx>
130
131
132
133
134
135 #endif // _Contap_Contour_HeaderFile