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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepPrimAPI_MakeRevol_HeaderFile
18 #define _BRepPrimAPI_MakeRevol_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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>
31 class BRepSweep_Revol;
34 //! Class to make revolved sweep topologies.
36 //! a revolved sweep is defined by :
38 //! * A basis topology which is swept.
40 //! The basis topology must not contain solids
41 //! (neither composite solids.).
43 //! The basis topology may be copied or shared in
46 //! * A rotation axis and angle :
48 //! - The axis is an Ax1 from gp.
50 //! - The angle is in [0, 2*Pi].
52 //! - The angle default value is 2*Pi.
54 //! The result is a topology with a higher dimension :
60 //! - Shell -> CompSolid.
62 //! Sweeping a Compound sweeps the elements of the
63 //! compound and creates a compound with the
65 class BRepPrimAPI_MakeRevol : public BRepPrimAPI_MakeSweep
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);
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);
80 //! Returns the internal sweeping algorithm.
81 Standard_EXPORT const BRepSweep_Revol& Revol() const;
83 //! Builds the resulting shape (redefined from MakeShape).
84 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
86 //! Returns the first shape of the revol (coinciding with
87 //! the generating shape).
88 Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE;
90 //! Returns the TopoDS Shape of the end of the revol.
91 Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE;
93 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
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);
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);
103 //! Check if there are degenerated edges in the result.
104 Standard_EXPORT Standard_Boolean HasDegenerated() const;
106 Standard_EXPORT const TopTools_ListOfShape& Degenerated() const;
121 BRepSweep_Revol myRevol;
122 TopTools_ListOfShape myDegenerated;
133 #endif // _BRepPrimAPI_MakeRevol_HeaderFile