0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart]
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakePrism.hxx
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
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_MakePrism_HeaderFile
18 #define _BRepPrimAPI_MakePrism_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22
23 #include <BRepSweep_Prism.hxx>
24 #include <BRepPrimAPI_MakeSweep.hxx>
25 #include <TopTools_ListOfShape.hxx>
26 class TopoDS_Shape;
27 class gp_Vec;
28 class gp_Dir;
29
30
31 //! Describes functions to build linear swept topologies, called prisms.
32 //! A prism is defined by:
33 //! -   a basis shape, which is swept, and
34 //! -   a sweeping direction, which is:
35 //! -   a vector for finite prisms, or
36 //! -   a direction for infinite or semi-infinite prisms.
37 //! The basis shape must not contain any solids.
38 //! The profile generates objects according to the following rules:
39 //! -   Vertices generate Edges
40 //! -   Edges generate Faces.
41 //! -   Wires generate Shells.
42 //! -   Faces generate Solids.
43 //! -   Shells generate Composite Solids
44 //! A MakePrism object provides a framework for:
45 //! -   defining the construction of a prism,
46 //! -   implementing the construction algorithm, and
47 //! -   consulting the result.
48 class BRepPrimAPI_MakePrism  : public BRepPrimAPI_MakeSweep
49 {
50 public:
51
52   DEFINE_STANDARD_ALLOC
53
54   
55   //! Builds the prism of base S and vector V. If C is true,
56   //! S is copied. If Canonize is true then generated surfaces
57   //! are attempted to be canonized in simple types
58   Standard_EXPORT BRepPrimAPI_MakePrism(const TopoDS_Shape& S, const gp_Vec& V, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
59   
60   //! Builds a semi-infinite or an infinite prism of base S.
61   //! If Inf is true the prism  is infinite, if Inf is false
62   //! the prism is semi-infinite (in the direction D).  If C
63   //! is true S is copied (for semi-infinite prisms).
64   //! If Canonize is true then generated surfaces
65   //! are attempted to be canonized in simple types
66   Standard_EXPORT BRepPrimAPI_MakePrism(const TopoDS_Shape& S, const gp_Dir& D, const Standard_Boolean Inf = Standard_True, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
67   
68   //! Returns the internal sweeping algorithm.
69   Standard_EXPORT const BRepSweep_Prism& Prism() const;
70   
71   //! Builds the resulting shape (redefined from MakeShape).
72   Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
73   
74   //! Returns the  TopoDS  Shape of the bottom of the prism.
75   Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE;
76   
77   //! Returns the TopoDS Shape of the top of the prism.
78   //! In the case of a finite prism, FirstShape returns the
79   //! basis of the prism, in other words, S if Copy is false;
80   //! otherwise, the copy of S belonging to the prism.
81   //! LastShape returns the copy of S translated by V at the
82   //! time of construction.
83   Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE;
84   
85   //! Returns ListOfShape from TopTools.
86   Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
87
88   //! Returns true if the shape S has been deleted.
89   Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& S) Standard_OVERRIDE;
90
91   //! Returns the TopoDS Shape of the bottom  of the  prism.
92   //! generated  with  theShape (subShape of the  generating shape).
93   Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& theShape);
94   
95   //! Returns the  TopoDS  Shape of the top  of  the  prism.
96   //! generated  with  theShape (subShape of the  generating shape).
97   Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& theShape);
98
99 protected:
100
101
102
103
104
105 private:
106
107
108
109   BRepSweep_Prism myPrism;
110
111
112 };
113
114
115
116
117
118
119
120 #endif // _BRepPrimAPI_MakePrism_HeaderFile