Warnings on vc14 were eliminated
[occt.git] / src / BRepFeat / BRepFeat_MakeRevol.hxx
1 // Created on: 1996-02-13
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1996-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 _BRepFeat_MakeRevol_HeaderFile
18 #define _BRepFeat_MakeRevol_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopoDS_Shape.hxx>
25 #include <TopTools_DataMapOfShapeListOfShape.hxx>
26 #include <gp_Ax1.hxx>
27 #include <TColGeom_SequenceOfCurve.hxx>
28 #include <BRepFeat_StatusError.hxx>
29 #include <BRepFeat_Form.hxx>
30 #include <Standard_Integer.hxx>
31 #include <Standard_Boolean.hxx>
32 #include <Standard_Real.hxx>
33 class Geom_Curve;
34 class Standard_ConstructionError;
35 class TopoDS_Shape;
36 class TopoDS_Face;
37 class gp_Ax1;
38 class TopoDS_Edge;
39
40
41 //! Describes functions to build revolved shells from basis shapes.
42 class BRepFeat_MakeRevol  : public BRepFeat_Form
43 {
44 public:
45
46   DEFINE_STANDARD_ALLOC
47
48   
49   //! initializes the revolved shell class.
50     BRepFeat_MakeRevol();
51   
52   //! a face Pbase is selected in the
53   //! shape Sbase to serve as the basis for the
54   //! revolved shell. The revolution will be defined
55   //! by the axis Axis and Fuse offers a choice between:
56   //! -   removing matter with a Boolean cut using the setting 0
57   //! -   adding matter with Boolean fusion using the setting 1.
58   //! The sketch face Skface serves to determine
59   //! the type of operation. If it is inside the basis
60   //! shape, a local operation such as glueing can be performed.
61     BRepFeat_MakeRevol(const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const gp_Ax1& Axis, const Standard_Integer Fuse, const Standard_Boolean Modify);
62   
63   Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Shape& Pbase, const TopoDS_Face& Skface, const gp_Ax1& Axis, const Standard_Integer Fuse, const Standard_Boolean Modify);
64   
65   //! Indicates that the edge <E> will slide on the face
66   //! <OnFace>. Raises ConstructionError if the  face does not belong to the
67   //! basis shape, or the edge to the prismed shape.
68   Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace);
69   
70   Standard_EXPORT void Perform (const Standard_Real Angle);
71   
72   Standard_EXPORT void Perform (const TopoDS_Shape& Until);
73   
74   //! Reconstructs the feature topologically.
75   Standard_EXPORT void Perform (const TopoDS_Shape& From, const TopoDS_Shape& Until);
76   
77   //! Builds an infinite shell. The infinite descendants
78   //! will not be kept in the result.
79   Standard_EXPORT void PerformThruAll();
80   
81   //! Assigns both a limiting shape, Until from
82   //! TopoDS_Shape, and an angle, Angle at
83   //! which to stop generation of the revolved shell feature.
84   Standard_EXPORT void PerformUntilAngle (const TopoDS_Shape& Until, const Standard_Real Angle);
85   
86   Standard_EXPORT void Curves (TColGeom_SequenceOfCurve& S);
87   
88   Standard_EXPORT Handle(Geom_Curve) BarycCurve();
89
90
91
92
93 protected:
94
95
96
97
98
99 private:
100
101
102
103   TopoDS_Shape myPbase;
104   TopTools_DataMapOfShapeListOfShape mySlface;
105   gp_Ax1 myAxis;
106   TColGeom_SequenceOfCurve myCurves;
107   Handle(Geom_Curve) myBCurve;
108   BRepFeat_StatusError myStatusError;
109
110
111 };
112
113
114 #include <BRepFeat_MakeRevol.lxx>
115
116
117
118
119
120 #endif // _BRepFeat_MakeRevol_HeaderFile