42cf5bc1 |
1 | // Created on: 1993-07-22 |
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_MakeRevolution_HeaderFile |
18 | #define _BRepPrimAPI_MakeRevolution_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <BRepPrim_Revolution.hxx> |
25 | #include <BRepPrimAPI_MakeOneAxis.hxx> |
26 | #include <Standard_Real.hxx> |
27 | #include <Standard_Address.hxx> |
28 | class Standard_DomainError; |
29 | class Geom_Curve; |
30 | class gp_Ax2; |
31 | class BRepPrim_Revolution; |
32 | |
33 | |
34 | //! Describes functions to build revolved shapes. |
35 | //! A MakeRevolution object provides a framework for: |
36 | //! - defining the construction of a revolved shape, |
37 | //! - implementing the construction algorithm, and |
38 | //! - consulting the result. |
39 | class BRepPrimAPI_MakeRevolution : public BRepPrimAPI_MakeOneAxis |
40 | { |
41 | public: |
42 | |
43 | DEFINE_STANDARD_ALLOC |
44 | |
45 | |
46 | //! Make a revolution body by rotating a curve around Z. |
47 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian); |
48 | |
49 | //! Make a revolution body by rotating a curve around Z. |
50 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian, const Standard_Real angle); |
51 | |
52 | //! Make a revolution body by rotating a curve around Z. |
53 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax); |
54 | |
55 | //! Make a revolution body by rotating a curve around Z. |
56 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real angle); |
57 | |
58 | //! Make a revolution body by rotating a curve around Z. |
59 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian); |
60 | |
61 | //! Make a revolution body by rotating a curve around Z. |
62 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian, const Standard_Real angle); |
63 | |
64 | //! Make a revolution body by rotating a curve around Z. |
65 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax); |
66 | |
67 | //! Make a revolution body by rotating a curve around Z. |
68 | //! For all algorithms the resulting shape is composed of |
69 | //! - a lateral revolved face, |
70 | //! - two planar faces in planes parallel to the plane z = |
71 | //! 0, and passing by the extremities of the revolved |
72 | //! portion of Meridian, if these points are not on the Z |
73 | //! axis (in case of a complete revolved shape, these faces are circles), |
74 | //! - and in the case of a portion of a revolved shape, two |
75 | //! planar faces to close the shape (in the planes u = 0 and u = angle). |
76 | Standard_EXPORT BRepPrimAPI_MakeRevolution(const gp_Ax2& Axes, const Handle(Geom_Curve)& Meridian, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real angle); |
77 | |
78 | //! Returns the algorithm. |
79 | Standard_EXPORT Standard_Address OneAxis(); |
80 | |
81 | //! Returns the algorithm. |
82 | Standard_EXPORT BRepPrim_Revolution& Revolution(); |
83 | |
84 | |
85 | |
86 | |
87 | protected: |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | private: |
94 | |
95 | |
96 | |
97 | BRepPrim_Revolution myRevolution; |
98 | |
99 | |
100 | }; |
101 | |
102 | |
103 | |
104 | |
105 | |
106 | |
107 | |
108 | #endif // _BRepPrimAPI_MakeRevolution_HeaderFile |