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
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 _BRepSweep_Prism_HeaderFile
18 #define _BRepSweep_Prism_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepSweep_Translation.hxx>
25 #include <Standard_Boolean.hxx>
26 class Standard_ConstructionError;
31 class TopLoc_Location;
34 //! Provides natural constructors to build BRepSweep
35 //! translated swept Primitives.
43 //! Builds the prism of base S and vector V. If C is true,
44 //! S is copied. If Canonize is true then generated surfaces
45 //! are attempted to be canonized in simple types
46 Standard_EXPORT BRepSweep_Prism(const TopoDS_Shape& S, const gp_Vec& V, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
48 //! Builds a semi-infinite or an infinite prism of base S.
49 //! If Copy is true S is copied. If Inf is true the prism
50 //! is infinite, if Inf is false the prism is infinite in
51 //! the direction D. If Canonize is true then generated surfaces
52 //! are attempted to be canonized in simple types
53 Standard_EXPORT BRepSweep_Prism(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);
55 //! Returns the TopoDS Shape attached to the prism.
56 Standard_EXPORT TopoDS_Shape Shape();
58 //! Returns the TopoDS Shape generated with aGenS
59 //! (subShape of the generating shape).
60 Standard_EXPORT TopoDS_Shape Shape (const TopoDS_Shape& aGenS);
62 //! Returns the TopoDS Shape of the bottom of the prism.
63 Standard_EXPORT TopoDS_Shape FirstShape();
65 //! Returns the TopoDS Shape of the bottom of the prism.
66 //! generated with aGenS (subShape of the generating
68 Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& aGenS);
70 //! Returns the TopoDS Shape of the top of the prism.
71 Standard_EXPORT TopoDS_Shape LastShape();
73 //! Returns the TopoDS Shape of the top of the prism.
74 //! generated with aGenS (subShape of the generating
76 Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& aGenS);
78 //! Returns the Vector of the Prism, if it is an infinite
79 //! prism the Vec is unitar.
80 Standard_EXPORT gp_Vec Vec() const;
94 //! used to build the NumShape of a limited prism.
95 Standard_EXPORT Sweep_NumShape NumShape() const;
97 //! used to build the NumShape of an infinite prism.
98 Standard_EXPORT Sweep_NumShape NumShape (const Standard_Boolean Inf) const;
100 //! used to build the Location.
101 Standard_EXPORT TopLoc_Location Location (const gp_Vec& V) const;
104 BRepSweep_Translation myTranslation;
115 #endif // _BRepSweep_Prism_HeaderFile