0023024: Update headers of OCCT files
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_MakeShell.cxx
CommitLineData
b311480e 1// Created on: 1994-02-18
2// Created by: Remi LEQUETTE
3// Copyright (c) 1994-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23#include <BRepBuilderAPI_MakeShell.ixx>
24
25
26//=======================================================================
27//function : BRepBuilderAPI_MakeShell
28//purpose :
29//=======================================================================
30
31BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell()
32{
33}
34
35
36//=======================================================================
37//function : BRepBuilderAPI_MakeShell
38//purpose :
39//=======================================================================
40
41BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
42 const Standard_Boolean Segment)
43: myMakeShell(S,Segment)
44{
45 if ( myMakeShell.IsDone()) {
46 Done();
47 myShape = myMakeShell.Shape();
48 }
49}
50
51
52//=======================================================================
53//function : BRepBuilderAPI_MakeShell
54//purpose :
55//=======================================================================
56
57BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
58 const Standard_Real UMin,
59 const Standard_Real UMax,
60 const Standard_Real VMin,
61 const Standard_Real VMax,
62 const Standard_Boolean Segment)
63: myMakeShell(S,UMin,UMax,VMin,VMax,Segment)
64{
65 if ( myMakeShell.IsDone()) {
66 Done();
67 myShape = myMakeShell.Shape();
68 }
69}
70
71
72//=======================================================================
73//function : Init
74//purpose :
75//=======================================================================
76
77void BRepBuilderAPI_MakeShell::Init(const Handle(Geom_Surface)& S,
78 const Standard_Real UMin,
79 const Standard_Real UMax,
80 const Standard_Real VMin,
81 const Standard_Real VMax,
82 const Standard_Boolean Segment)
83{
84 myMakeShell.Init(S,UMin,UMax,VMin,VMax,Segment);
85 if ( myMakeShell.IsDone()) {
86 Done();
87 myShape = myMakeShell.Shape();
88 }
89}
90
91//=======================================================================
92//function : IsDone
93//purpose :
94//=======================================================================
95
96Standard_Boolean BRepBuilderAPI_MakeShell::IsDone() const
97{
98 return myMakeShell.IsDone();
99}
100
101
102
103//=======================================================================
104//function : Error
105//purpose :
106//=======================================================================
107
108BRepBuilderAPI_ShellError BRepBuilderAPI_MakeShell::Error() const
109{
110 switch ( myMakeShell.Error()) {
111
112 case BRepLib_ShellDone:
113 return BRepBuilderAPI_ShellDone;
114
115 case BRepLib_EmptyShell:
116 return BRepBuilderAPI_EmptyShell;
117
118 case BRepLib_DisconnectedShell:
119 return BRepBuilderAPI_DisconnectedShell;
120
121 case BRepLib_ShellParametersOutOfRange:
122 return BRepBuilderAPI_ShellParametersOutOfRange;
123
124 }
125
126 // portage WNT
127 return BRepBuilderAPI_ShellDone;
128}
129
130
131//=======================================================================
132//function : TopoDS_Shell&
133//purpose :
134//=======================================================================
135
136const TopoDS_Shell& BRepBuilderAPI_MakeShell::Shell() const
137{
138 return myMakeShell.Shell();
139}
140
141
142
143//=======================================================================
144//function : TopoDS_Shell
145//purpose :
146//=======================================================================
147
148BRepBuilderAPI_MakeShell::operator TopoDS_Shell() const
149{
150 return Shell();
151}
152
153