0024624: Lost word in license statement in source 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
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17#include <BRepBuilderAPI_MakeShell.ixx>
18
19
20//=======================================================================
21//function : BRepBuilderAPI_MakeShell
22//purpose :
23//=======================================================================
24
25BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell()
26{
27}
28
29
30//=======================================================================
31//function : BRepBuilderAPI_MakeShell
32//purpose :
33//=======================================================================
34
35BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
36 const Standard_Boolean Segment)
37: myMakeShell(S,Segment)
38{
39 if ( myMakeShell.IsDone()) {
40 Done();
41 myShape = myMakeShell.Shape();
42 }
43}
44
45
46//=======================================================================
47//function : BRepBuilderAPI_MakeShell
48//purpose :
49//=======================================================================
50
51BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
52 const Standard_Real UMin,
53 const Standard_Real UMax,
54 const Standard_Real VMin,
55 const Standard_Real VMax,
56 const Standard_Boolean Segment)
57: myMakeShell(S,UMin,UMax,VMin,VMax,Segment)
58{
59 if ( myMakeShell.IsDone()) {
60 Done();
61 myShape = myMakeShell.Shape();
62 }
63}
64
65
66//=======================================================================
67//function : Init
68//purpose :
69//=======================================================================
70
71void BRepBuilderAPI_MakeShell::Init(const Handle(Geom_Surface)& S,
72 const Standard_Real UMin,
73 const Standard_Real UMax,
74 const Standard_Real VMin,
75 const Standard_Real VMax,
76 const Standard_Boolean Segment)
77{
78 myMakeShell.Init(S,UMin,UMax,VMin,VMax,Segment);
79 if ( myMakeShell.IsDone()) {
80 Done();
81 myShape = myMakeShell.Shape();
82 }
83}
84
85//=======================================================================
86//function : IsDone
87//purpose :
88//=======================================================================
89
90Standard_Boolean BRepBuilderAPI_MakeShell::IsDone() const
91{
92 return myMakeShell.IsDone();
93}
94
95
96
97//=======================================================================
98//function : Error
99//purpose :
100//=======================================================================
101
102BRepBuilderAPI_ShellError BRepBuilderAPI_MakeShell::Error() const
103{
104 switch ( myMakeShell.Error()) {
105
106 case BRepLib_ShellDone:
107 return BRepBuilderAPI_ShellDone;
108
109 case BRepLib_EmptyShell:
110 return BRepBuilderAPI_EmptyShell;
111
112 case BRepLib_DisconnectedShell:
113 return BRepBuilderAPI_DisconnectedShell;
114
115 case BRepLib_ShellParametersOutOfRange:
116 return BRepBuilderAPI_ShellParametersOutOfRange;
117
118 }
119
120 // portage WNT
121 return BRepBuilderAPI_ShellDone;
122}
123
124
125//=======================================================================
126//function : TopoDS_Shell&
127//purpose :
128//=======================================================================
129
130const TopoDS_Shell& BRepBuilderAPI_MakeShell::Shell() const
131{
132 return myMakeShell.Shell();
133}
134
135
136
137//=======================================================================
138//function : TopoDS_Shell
139//purpose :
140//=======================================================================
141
142BRepBuilderAPI_MakeShell::operator TopoDS_Shell() const
143{
144 return Shell();
145}
146
147