0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[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
7fd59977 17
42cf5bc1 18#include <BRepBuilderAPI_MakeShell.hxx>
19#include <Geom_Surface.hxx>
42cf5bc1 20#include <TopoDS_Shell.hxx>
7fd59977 21
22//=======================================================================
23//function : BRepBuilderAPI_MakeShell
24//purpose :
25//=======================================================================
7fd59977 26BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell()
27{
28}
29
30
31//=======================================================================
32//function : BRepBuilderAPI_MakeShell
33//purpose :
34//=======================================================================
35
36BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
37 const Standard_Boolean Segment)
38: myMakeShell(S,Segment)
39{
40 if ( myMakeShell.IsDone()) {
41 Done();
42 myShape = myMakeShell.Shape();
43 }
44}
45
46
47//=======================================================================
48//function : BRepBuilderAPI_MakeShell
49//purpose :
50//=======================================================================
51
52BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S,
53 const Standard_Real UMin,
54 const Standard_Real UMax,
55 const Standard_Real VMin,
56 const Standard_Real VMax,
57 const Standard_Boolean Segment)
58: myMakeShell(S,UMin,UMax,VMin,VMax,Segment)
59{
60 if ( myMakeShell.IsDone()) {
61 Done();
62 myShape = myMakeShell.Shape();
63 }
64}
65
66
67//=======================================================================
68//function : Init
69//purpose :
70//=======================================================================
71
72void BRepBuilderAPI_MakeShell::Init(const Handle(Geom_Surface)& S,
73 const Standard_Real UMin,
74 const Standard_Real UMax,
75 const Standard_Real VMin,
76 const Standard_Real VMax,
77 const Standard_Boolean Segment)
78{
79 myMakeShell.Init(S,UMin,UMax,VMin,VMax,Segment);
80 if ( myMakeShell.IsDone()) {
81 Done();
82 myShape = myMakeShell.Shape();
83 }
84}
85
86//=======================================================================
87//function : IsDone
88//purpose :
89//=======================================================================
90
91Standard_Boolean BRepBuilderAPI_MakeShell::IsDone() const
92{
93 return myMakeShell.IsDone();
94}
95
96
97
98//=======================================================================
99//function : Error
100//purpose :
101//=======================================================================
102
103BRepBuilderAPI_ShellError BRepBuilderAPI_MakeShell::Error() const
104{
105 switch ( myMakeShell.Error()) {
106
107 case BRepLib_ShellDone:
108 return BRepBuilderAPI_ShellDone;
109
110 case BRepLib_EmptyShell:
111 return BRepBuilderAPI_EmptyShell;
112
113 case BRepLib_DisconnectedShell:
114 return BRepBuilderAPI_DisconnectedShell;
115
116 case BRepLib_ShellParametersOutOfRange:
117 return BRepBuilderAPI_ShellParametersOutOfRange;
118
119 }
120
121 // portage WNT
122 return BRepBuilderAPI_ShellDone;
123}
124
125
126//=======================================================================
127//function : TopoDS_Shell&
128//purpose :
129//=======================================================================
130
131const TopoDS_Shell& BRepBuilderAPI_MakeShell::Shell() const
132{
133 return myMakeShell.Shell();
134}
135
136
137
138//=======================================================================
139//function : TopoDS_Shell
140//purpose :
141//=======================================================================
142
143BRepBuilderAPI_MakeShell::operator TopoDS_Shell() const
144{
145 return Shell();
146}
147
148