42cf5bc1 |
1 | // Created on: 1993-03-04 |
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_ContAna_HeaderFile |
18 | #define _Contap_ContAna_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <Standard_Integer.hxx> |
26 | #include <GeomAbs_CurveType.hxx> |
27 | #include <gp_Pnt.hxx> |
28 | #include <gp_Dir.hxx> |
29 | #include <Standard_Real.hxx> |
30 | #include <gp_Circ.hxx> |
42cf5bc1 |
31 | class gp_Sphere; |
42cf5bc1 |
32 | class gp_Cylinder; |
33 | class gp_Cone; |
34 | class gp_Lin; |
35 | |
36 | |
37 | //! This class provides the computation of the contours |
38 | //! for quadric surfaces. |
39 | class Contap_ContAna |
40 | { |
41 | public: |
42 | |
43 | DEFINE_STANDARD_ALLOC |
44 | |
45 | |
46 | Standard_EXPORT Contap_ContAna(); |
47 | |
48 | Standard_EXPORT void Perform (const gp_Sphere& S, const gp_Dir& D); |
49 | |
50 | Standard_EXPORT void Perform (const gp_Sphere& S, const gp_Dir& D, const Standard_Real Ang); |
51 | |
52 | Standard_EXPORT void Perform (const gp_Sphere& S, const gp_Pnt& Eye); |
53 | |
54 | Standard_EXPORT void Perform (const gp_Cylinder& C, const gp_Dir& D); |
55 | |
56 | Standard_EXPORT void Perform (const gp_Cylinder& C, const gp_Dir& D, const Standard_Real Ang); |
57 | |
58 | Standard_EXPORT void Perform (const gp_Cylinder& C, const gp_Pnt& Eye); |
59 | |
60 | Standard_EXPORT void Perform (const gp_Cone& C, const gp_Dir& D); |
61 | |
62 | Standard_EXPORT void Perform (const gp_Cone& C, const gp_Dir& D, const Standard_Real Ang); |
63 | |
64 | Standard_EXPORT void Perform (const gp_Cone& C, const gp_Pnt& Eye); |
65 | |
66 | Standard_Boolean IsDone() const; |
67 | |
68 | Standard_Integer NbContours() const; |
69 | |
70 | //! Returns GeomAbs_Line or GeomAbs_Circle, when |
71 | //! IsDone() returns True. |
72 | GeomAbs_CurveType TypeContour() const; |
73 | |
74 | gp_Circ Circle() const; |
75 | |
76 | Standard_EXPORT gp_Lin Line (const Standard_Integer Index) const; |
77 | |
78 | |
79 | |
80 | |
81 | protected: |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | private: |
88 | |
89 | |
90 | |
91 | Standard_Boolean done; |
92 | Standard_Integer nbSol; |
93 | GeomAbs_CurveType typL; |
94 | gp_Pnt pt1; |
95 | gp_Pnt pt2; |
96 | gp_Pnt pt3; |
97 | gp_Pnt pt4; |
98 | gp_Dir dir1; |
99 | gp_Dir dir2; |
100 | gp_Dir dir3; |
101 | gp_Dir dir4; |
102 | Standard_Real prm; |
103 | |
104 | |
105 | }; |
106 | |
107 | |
108 | #include <Contap_ContAna.lxx> |
109 | |
110 | |
111 | |
112 | |
113 | |
114 | #endif // _Contap_ContAna_HeaderFile |