1 // Created on: 1994-02-18
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1994-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 #include <BRepBuilderAPI_MakeShell.ixx>
20 //=======================================================================
21 //function : BRepBuilderAPI_MakeShell
23 //=======================================================================
25 BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell()
30 //=======================================================================
31 //function : BRepBuilderAPI_MakeShell
33 //=======================================================================
35 BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
36 const Standard_Boolean Segment)
37 : myMakeShell(S,Segment)
39 if ( myMakeShell.IsDone()) {
41 myShape = myMakeShell.Shape();
46 //=======================================================================
47 //function : BRepBuilderAPI_MakeShell
49 //=======================================================================
51 BRepBuilderAPI_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)
59 if ( myMakeShell.IsDone()) {
61 myShape = myMakeShell.Shape();
66 //=======================================================================
69 //=======================================================================
71 void 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)
78 myMakeShell.Init(S,UMin,UMax,VMin,VMax,Segment);
79 if ( myMakeShell.IsDone()) {
81 myShape = myMakeShell.Shape();
85 //=======================================================================
88 //=======================================================================
90 Standard_Boolean BRepBuilderAPI_MakeShell::IsDone() const
92 return myMakeShell.IsDone();
97 //=======================================================================
100 //=======================================================================
102 BRepBuilderAPI_ShellError BRepBuilderAPI_MakeShell::Error() const
104 switch ( myMakeShell.Error()) {
106 case BRepLib_ShellDone:
107 return BRepBuilderAPI_ShellDone;
109 case BRepLib_EmptyShell:
110 return BRepBuilderAPI_EmptyShell;
112 case BRepLib_DisconnectedShell:
113 return BRepBuilderAPI_DisconnectedShell;
115 case BRepLib_ShellParametersOutOfRange:
116 return BRepBuilderAPI_ShellParametersOutOfRange;
121 return BRepBuilderAPI_ShellDone;
125 //=======================================================================
126 //function : TopoDS_Shell&
128 //=======================================================================
130 const TopoDS_Shell& BRepBuilderAPI_MakeShell::Shell() const
132 return myMakeShell.Shell();
137 //=======================================================================
138 //function : TopoDS_Shell
140 //=======================================================================
142 BRepBuilderAPI_MakeShell::operator TopoDS_Shell() const