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.
18 #include <BRepBuilderAPI_MakeShell.hxx>
19 #include <Geom_Surface.hxx>
20 #include <StdFail_NotDone.hxx>
21 #include <TopoDS_Shell.hxx>
23 //=======================================================================
24 //function : BRepBuilderAPI_MakeShell
26 //=======================================================================
27 BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell()
32 //=======================================================================
33 //function : BRepBuilderAPI_MakeShell
35 //=======================================================================
37 BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
38 const Standard_Boolean Segment)
39 : myMakeShell(S,Segment)
41 if ( myMakeShell.IsDone()) {
43 myShape = myMakeShell.Shape();
48 //=======================================================================
49 //function : BRepBuilderAPI_MakeShell
51 //=======================================================================
53 BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
54 const Standard_Real UMin,
55 const Standard_Real UMax,
56 const Standard_Real VMin,
57 const Standard_Real VMax,
58 const Standard_Boolean Segment)
59 : myMakeShell(S,UMin,UMax,VMin,VMax,Segment)
61 if ( myMakeShell.IsDone()) {
63 myShape = myMakeShell.Shape();
68 //=======================================================================
71 //=======================================================================
73 void BRepBuilderAPI_MakeShell::Init(const Handle(Geom_Surface)& S,
74 const Standard_Real UMin,
75 const Standard_Real UMax,
76 const Standard_Real VMin,
77 const Standard_Real VMax,
78 const Standard_Boolean Segment)
80 myMakeShell.Init(S,UMin,UMax,VMin,VMax,Segment);
81 if ( myMakeShell.IsDone()) {
83 myShape = myMakeShell.Shape();
87 //=======================================================================
90 //=======================================================================
92 Standard_Boolean BRepBuilderAPI_MakeShell::IsDone() const
94 return myMakeShell.IsDone();
99 //=======================================================================
102 //=======================================================================
104 BRepBuilderAPI_ShellError BRepBuilderAPI_MakeShell::Error() const
106 switch ( myMakeShell.Error()) {
108 case BRepLib_ShellDone:
109 return BRepBuilderAPI_ShellDone;
111 case BRepLib_EmptyShell:
112 return BRepBuilderAPI_EmptyShell;
114 case BRepLib_DisconnectedShell:
115 return BRepBuilderAPI_DisconnectedShell;
117 case BRepLib_ShellParametersOutOfRange:
118 return BRepBuilderAPI_ShellParametersOutOfRange;
123 return BRepBuilderAPI_ShellDone;
127 //=======================================================================
128 //function : TopoDS_Shell&
130 //=======================================================================
132 const TopoDS_Shell& BRepBuilderAPI_MakeShell::Shell() const
134 return myMakeShell.Shell();
139 //=======================================================================
140 //function : TopoDS_Shell
142 //=======================================================================
144 BRepBuilderAPI_MakeShell::operator TopoDS_Shell() const