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 <Adaptor3d_Surface.hxx>
21 #include <Contap_TheSequenceOfLine.hxx>
22 #include <Contap_TheSearch.hxx>
23 #include <Contap_TheSearchInside.hxx>
24 #include <Contap_SurfFunction.hxx>
25 #include <Contap_ArcFunction.hxx>
26 
27 class gp_Vec;
28 class gp_Pnt;
29 class Adaptor3d_TopolTool;
30 
31 class Contap_Contour
32 {
33 public:
34 
35   DEFINE_STANDARD_ALLOC
36 
37 
38   Standard_EXPORT Contap_Contour();
39 
40   Standard_EXPORT Contap_Contour(const gp_Vec& Direction);
41 
42   Standard_EXPORT Contap_Contour(const gp_Vec& Direction, const Standard_Real Angle);
43 
44   Standard_EXPORT Contap_Contour(const gp_Pnt& Eye);
45 
46   //! Creates the contour in a given direction.
47   Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction);
48 
49   //! Creates the contour in a given direction.
50   Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle);
51 
52   //! Creates the contour for a perspective view.
53   Standard_EXPORT Contap_Contour(const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye);
54 
55   //! Creates the contour in a given direction.
56   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain);
57 
58   //! Creates the contour in a given direction.
59   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction);
60 
61   //! Creates the contour in a given direction.
62   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Vec& Direction, const Standard_Real Angle);
63 
64   //! Creates the contour for a perspective view.
65   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain, const gp_Pnt& Eye);
66 
67   Standard_EXPORT void Init (const gp_Vec& Direction);
68 
69   Standard_EXPORT void Init (const gp_Vec& Direction, const Standard_Real Angle);
70 
71   Standard_EXPORT void Init (const gp_Pnt& Eye);
72 
73     Standard_Boolean IsDone() const;
74 
75   //! Returns true if the is no line.
76     Standard_Boolean IsEmpty() const;
77 
78     Standard_Integer NbLines() const;
79 
80     const Contap_Line& Line (const Standard_Integer Index) const;
81 
82   //! Returns    a     reference   on     the   internal
83   //! SurfaceFunction.  This is used to compute tangents
84   //! on the lines.
85     Contap_SurfFunction& SurfaceFunction();
86 
87 
88 
89 
90 protected:
91 
92 
93 
94 
95 
96 private:
97 
98 
99   Standard_EXPORT void Perform (const Handle(Adaptor3d_TopolTool)& Domain);
100 
101   Standard_EXPORT void PerformAna (const Handle(Adaptor3d_TopolTool)& Domain);
102 
103 
104   Standard_Boolean done;
105   Contap_TheSequenceOfLine slin;
106   Contap_TheSearch solrst;
107   Contap_TheSearchInside solins;
108   Contap_SurfFunction mySFunc;
109   Contap_ArcFunction myAFunc;
110   Standard_Boolean modeset;
111 
112 
113 };
114 
115 
116 #include <Contap_Contour.lxx>
117 
118 
119 
120 
121 
122 #endif // _Contap_Contour_HeaderFile
123