Warnings on vc14 were eliminated
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakeRevol.hxx
1 // Created on: 1993-10-12
2 // Created by: Remi LEQUETTE
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 _BRepPrimAPI_MakeRevol_HeaderFile
18 #define _BRepPrimAPI_MakeRevol_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <BRepSweep_Revol.hxx>
25 #include <TopTools_ListOfShape.hxx>
26 #include <BRepPrimAPI_MakeSweep.hxx>
27 #include <Standard_Real.hxx>
28 #include <Standard_Boolean.hxx>
29 class TopoDS_Shape;
30 class gp_Ax1;
31 class BRepSweep_Revol;
32
33
34 //! Class to make revolved sweep topologies.
35 //!
36 //! a revolved sweep is defined by :
37 //!
38 //! * A basis topology which is swept.
39 //!
40 //! The   basis topology  must   not  contain solids
41 //! (neither composite solids.).
42 //!
43 //! The basis topology  may be copied  or  shared in
44 //! the result.
45 //!
46 //! * A rotation axis and angle :
47 //!
48 //! - The axis is an Ax1 from gp.
49 //!
50 //! - The angle is in [0, 2*Pi].
51 //!
52 //! - The angle default value is 2*Pi.
53 //!
54 //! The result is a topology with a higher dimension :
55 //!
56 //! - Vertex -> Edge.
57 //! - Edge   -> Face.
58 //! - Wire   -> Shell.
59 //! - Face   -> Solid.
60 //! - Shell  -> CompSolid.
61 //!
62 //! Sweeping a Compound sweeps  the elements  of the
63 //! compound  and creates    a  compound with    the
64 //! results.
65 class BRepPrimAPI_MakeRevol  : public BRepPrimAPI_MakeSweep
66 {
67 public:
68
69   DEFINE_STANDARD_ALLOC
70
71   
72   //! Builds the Revol of base S, axis  A and angle  D. If C
73   //! is true, S is copied.
74   Standard_EXPORT BRepPrimAPI_MakeRevol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Real D, const Standard_Boolean Copy = Standard_False);
75   
76   //! Builds the Revol of base S, axis  A and angle 2*Pi. If
77   //! C is true, S is copied.
78   Standard_EXPORT BRepPrimAPI_MakeRevol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Boolean Copy = Standard_False);
79   
80   //! Returns the internal sweeping algorithm.
81   Standard_EXPORT const BRepSweep_Revol& Revol() const;
82   
83   //! Builds the resulting shape (redefined from MakeShape).
84   Standard_EXPORT virtual void Build() Standard_OVERRIDE;
85   
86   //! Returns the first shape of the revol  (coinciding with
87   //! the generating shape).
88   Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE;
89   
90   //! Returns the TopoDS Shape of the end of the revol.
91   Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE;
92   
93   Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
94   
95   //! Returns the TopoDS Shape of the beginning of the revolution,
96   //! generated with theShape  (subShape of the generating shape).
97   Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& theShape);
98   
99   //! Returns the TopoDS Shape of the end of the revolution,
100   //! generated with  theShape (subShape of the  generating shape).
101   Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& theShape);
102   
103   //! Check if there are degenerated edges in the result.
104   Standard_EXPORT Standard_Boolean HasDegenerated() const;
105   
106   Standard_EXPORT const TopTools_ListOfShape& Degenerated() const;
107
108
109
110
111 protected:
112
113
114
115
116
117 private:
118
119
120
121   BRepSweep_Revol myRevol;
122   TopTools_ListOfShape myDegenerated;
123
124
125 };
126
127
128
129
130
131
132
133 #endif // _BRepPrimAPI_MakeRevol_HeaderFile