0027930: XMT file conversion loops infinitely
[occt.git] / src / Contap / Contap_ContAna.hxx
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>
31 class StdFail_NotDone;
32 class Standard_DomainError;
33 class Standard_OutOfRange;
34 class gp_Sphere;
35 class gp_Dir;
36 class gp_Pnt;
37 class gp_Cylinder;
38 class gp_Cone;
39 class gp_Lin;
40
41
42 //! This class provides the computation of the contours
43 //! for quadric surfaces.
44 class Contap_ContAna 
45 {
46 public:
47
48   DEFINE_STANDARD_ALLOC
49
50   
51   Standard_EXPORT Contap_ContAna();
52   
53   Standard_EXPORT void Perform (const gp_Sphere& S, const gp_Dir& D);
54   
55   Standard_EXPORT void Perform (const gp_Sphere& S, const gp_Dir& D, const Standard_Real Ang);
56   
57   Standard_EXPORT void Perform (const gp_Sphere& S, const gp_Pnt& Eye);
58   
59   Standard_EXPORT void Perform (const gp_Cylinder& C, const gp_Dir& D);
60   
61   Standard_EXPORT void Perform (const gp_Cylinder& C, const gp_Dir& D, const Standard_Real Ang);
62   
63   Standard_EXPORT void Perform (const gp_Cylinder& C, const gp_Pnt& Eye);
64   
65   Standard_EXPORT void Perform (const gp_Cone& C, const gp_Dir& D);
66   
67   Standard_EXPORT void Perform (const gp_Cone& C, const gp_Dir& D, const Standard_Real Ang);
68   
69   Standard_EXPORT void Perform (const gp_Cone& C, const gp_Pnt& Eye);
70   
71     Standard_Boolean IsDone() const;
72   
73     Standard_Integer NbContours() const;
74   
75   //! Returns GeomAbs_Line or GeomAbs_Circle, when
76   //! IsDone() returns True.
77     GeomAbs_CurveType TypeContour() const;
78   
79     gp_Circ Circle() const;
80   
81   Standard_EXPORT gp_Lin Line (const Standard_Integer Index) const;
82
83
84
85
86 protected:
87
88
89
90
91
92 private:
93
94
95
96   Standard_Boolean done;
97   Standard_Integer nbSol;
98   GeomAbs_CurveType typL;
99   gp_Pnt pt1;
100   gp_Pnt pt2;
101   gp_Pnt pt3;
102   gp_Pnt pt4;
103   gp_Dir dir1;
104   gp_Dir dir2;
105   gp_Dir dir3;
106   gp_Dir dir4;
107   Standard_Real prm;
108
109
110 };
111
112
113 #include <Contap_ContAna.lxx>
114
115
116
117
118
119 #endif // _Contap_ContAna_HeaderFile