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
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 _BRepFeat_MakeRevol_HeaderFile
18 #define _BRepFeat_MakeRevol_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopoDS_Shape.hxx>
25 #include <TopTools_DataMapOfShapeListOfShape.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>
34 class Standard_ConstructionError;
41 //! Describes functions to build revolved shells from basis shapes.
42 class BRepFeat_MakeRevol : public BRepFeat_Form
49 //! initializes the revolved shell class.
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);
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);
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);
70 Standard_EXPORT void Perform (const Standard_Real Angle);
72 Standard_EXPORT void Perform (const TopoDS_Shape& Until);
74 //! Reconstructs the feature topologically.
75 Standard_EXPORT void Perform (const TopoDS_Shape& From, const TopoDS_Shape& Until);
77 //! Builds an infinite shell. The infinite descendants
78 //! will not be kept in the result.
79 Standard_EXPORT void PerformThruAll();
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);
86 Standard_EXPORT void Curves (TColGeom_SequenceOfCurve& S);
88 Standard_EXPORT Handle(Geom_Curve) BarycCurve();
103 TopoDS_Shape myPbase;
104 TopTools_DataMapOfShapeListOfShape mySlface;
106 TColGeom_SequenceOfCurve myCurves;
107 Handle(Geom_Curve) myBCurve;
108 BRepFeat_StatusError myStatusError;
114 #include <BRepFeat_MakeRevol.lxx>
120 #endif // _BRepFeat_MakeRevol_HeaderFile