42cf5bc1 |
1 | // Created on: 1993-06-22 |
2 | // Created by: Laurent BOURESCHE |
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 _BRepSweep_Revol_HeaderFile |
18 | #define _BRepSweep_Revol_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <BRepSweep_Rotation.hxx> |
42cf5bc1 |
25 | #include <Standard_Boolean.hxx> |
26 | #include <Standard_Real.hxx> |
27 | class Standard_ConstructionError; |
28 | class TopoDS_Shape; |
29 | class gp_Ax1; |
30 | class Sweep_NumShape; |
31 | class TopLoc_Location; |
32 | |
33 | |
34 | //! Provides natural constructors to build BRepSweep |
35 | //! rotated swept Primitives. |
36 | class BRepSweep_Revol |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | //! Builds the Revol of meridian S axis A and angle D. If |
44 | //! C is true S is copied. |
09324e85 |
45 | Standard_EXPORT BRepSweep_Revol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Real D, const Standard_Boolean C = Standard_False); |
42cf5bc1 |
46 | |
47 | //! Builds the Revol of meridian S axis A and angle 2*Pi. |
48 | //! If C is true S is copied. |
49 | Standard_EXPORT BRepSweep_Revol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Boolean C = Standard_False); |
50 | |
51 | //! Returns the TopoDS Shape attached to the Revol. |
52 | Standard_EXPORT TopoDS_Shape Shape(); |
53 | |
54 | //! Returns the TopoDS Shape generated with aGenS |
55 | //! (subShape of the generating shape). |
56 | Standard_EXPORT TopoDS_Shape Shape (const TopoDS_Shape& aGenS); |
57 | |
58 | //! Returns the first shape of the revol (coinciding with |
59 | //! the generating shape). |
60 | Standard_EXPORT TopoDS_Shape FirstShape(); |
61 | |
62 | //! Returns the first shape of the revol (coinciding with |
63 | //! the generating shape). |
64 | Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& aGenS); |
65 | |
66 | //! Returns the TopoDS Shape of the top of the prism. |
67 | Standard_EXPORT TopoDS_Shape LastShape(); |
68 | |
69 | //! Returns the TopoDS Shape of the top of the prism. |
70 | //! generated with aGenS (subShape of the generating |
71 | //! shape). |
72 | Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& aGenS); |
73 | |
74 | //! returns the axis |
75 | Standard_EXPORT gp_Ax1 Axe() const; |
76 | |
77 | //! returns the angle. |
09324e85 |
78 | Standard_EXPORT Standard_Real Angle() const; |
42cf5bc1 |
79 | |
80 | private: |
81 | |
42cf5bc1 |
82 | //! builds the NumShape. |
83 | Standard_EXPORT Sweep_NumShape NumShape (const Standard_Real D) const; |
84 | |
85 | //! Builds the Location |
86 | Standard_EXPORT TopLoc_Location Location (const gp_Ax1& Ax, const Standard_Real D) const; |
87 | |
88 | //! Builds the axis |
89 | Standard_EXPORT gp_Ax1 Axe (const gp_Ax1& Ax, const Standard_Real D) const; |
90 | |
91 | //! computes the angle. |
92 | Standard_EXPORT Standard_Real Angle (const Standard_Real D) const; |
93 | |
94 | |
95 | BRepSweep_Rotation myRotation; |
96 | |
97 | |
98 | }; |
99 | |
42cf5bc1 |
100 | #endif // _BRepSweep_Revol_HeaderFile |