0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation...
[occt.git] / src / BRepSweep / BRepSweep_Prism.hxx
CommitLineData
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_Prism_HeaderFile
18#define _BRepSweep_Prism_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRepSweep_Translation.hxx>
25#include <Standard_Boolean.hxx>
26class Standard_ConstructionError;
27class TopoDS_Shape;
28class gp_Vec;
29class gp_Dir;
30class Sweep_NumShape;
31class TopLoc_Location;
32
33
34//! Provides natural constructors to build BRepSweep
35//! translated swept Primitives.
36class BRepSweep_Prism
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
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);
47
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);
54
55 //! Returns the TopoDS Shape attached to the prism.
56 Standard_EXPORT TopoDS_Shape Shape();
57
58 //! Returns the TopoDS Shape generated with aGenS
59 //! (subShape of the generating shape).
60 Standard_EXPORT TopoDS_Shape Shape (const TopoDS_Shape& aGenS);
61
62 //! Returns the TopoDS Shape of the bottom of the prism.
63 Standard_EXPORT TopoDS_Shape FirstShape();
64
65 //! Returns the TopoDS Shape of the bottom of the prism.
66 //! generated with aGenS (subShape of the generating
67 //! shape).
68 Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& aGenS);
69
70 //! Returns the TopoDS Shape of the top of the prism.
71 Standard_EXPORT TopoDS_Shape LastShape();
72
73 //! Returns the TopoDS Shape of the top of the prism.
74 //! generated with aGenS (subShape of the generating
75 //! shape).
76 Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& aGenS);
77
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;
81
82
80eeb3ce 83 //! Returns true if the
84 //! aGenS is used in resulting shape
85 Standard_EXPORT Standard_Boolean IsUsed(const TopoDS_Shape& aGenS) const;
42cf5bc1 86
80eeb3ce 87 //! Returns true if the shape, generated from theS
88 //! is used in result shape
89 Standard_EXPORT Standard_Boolean GenIsUsed(const TopoDS_Shape& theS) const;
42cf5bc1 90
91protected:
92
93
94
95
96
97private:
98
99
100 //! used to build the NumShape of a limited prism.
101 Standard_EXPORT Sweep_NumShape NumShape() const;
102
103 //! used to build the NumShape of an infinite prism.
104 Standard_EXPORT Sweep_NumShape NumShape (const Standard_Boolean Inf) const;
105
106 //! used to build the Location.
107 Standard_EXPORT TopLoc_Location Location (const gp_Vec& V) const;
108
109
110 BRepSweep_Translation myTranslation;
111
112
113};
114
115
116
117
118
119
120
121#endif // _BRepSweep_Prism_HeaderFile