7fd59977 |
1 | // File: BRepBuilderAPI_MakeShell.cxx |
2 | // Created: Fri Feb 18 15:13:16 1994 |
3 | // Author: Remi LEQUETTE |
4 | // <rle@nonox> |
5 | |
6 | |
7 | #include <BRepBuilderAPI_MakeShell.ixx> |
8 | |
9 | |
10 | //======================================================================= |
11 | //function : BRepBuilderAPI_MakeShell |
12 | //purpose : |
13 | //======================================================================= |
14 | |
15 | BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell() |
16 | { |
17 | } |
18 | |
19 | |
20 | //======================================================================= |
21 | //function : BRepBuilderAPI_MakeShell |
22 | //purpose : |
23 | //======================================================================= |
24 | |
25 | BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, |
26 | const Standard_Boolean Segment) |
27 | : myMakeShell(S,Segment) |
28 | { |
29 | if ( myMakeShell.IsDone()) { |
30 | Done(); |
31 | myShape = myMakeShell.Shape(); |
32 | } |
33 | } |
34 | |
35 | |
36 | //======================================================================= |
37 | //function : BRepBuilderAPI_MakeShell |
38 | //purpose : |
39 | //======================================================================= |
40 | |
41 | BRepBuilderAPI_MakeShell::BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, |
42 | const Standard_Real UMin, |
43 | const Standard_Real UMax, |
44 | const Standard_Real VMin, |
45 | const Standard_Real VMax, |
46 | const Standard_Boolean Segment) |
47 | : myMakeShell(S,UMin,UMax,VMin,VMax,Segment) |
48 | { |
49 | if ( myMakeShell.IsDone()) { |
50 | Done(); |
51 | myShape = myMakeShell.Shape(); |
52 | } |
53 | } |
54 | |
55 | |
56 | //======================================================================= |
57 | //function : Init |
58 | //purpose : |
59 | //======================================================================= |
60 | |
61 | void BRepBuilderAPI_MakeShell::Init(const Handle(Geom_Surface)& S, |
62 | const Standard_Real UMin, |
63 | const Standard_Real UMax, |
64 | const Standard_Real VMin, |
65 | const Standard_Real VMax, |
66 | const Standard_Boolean Segment) |
67 | { |
68 | myMakeShell.Init(S,UMin,UMax,VMin,VMax,Segment); |
69 | if ( myMakeShell.IsDone()) { |
70 | Done(); |
71 | myShape = myMakeShell.Shape(); |
72 | } |
73 | } |
74 | |
75 | //======================================================================= |
76 | //function : IsDone |
77 | //purpose : |
78 | //======================================================================= |
79 | |
80 | Standard_Boolean BRepBuilderAPI_MakeShell::IsDone() const |
81 | { |
82 | return myMakeShell.IsDone(); |
83 | } |
84 | |
85 | |
86 | |
87 | //======================================================================= |
88 | //function : Error |
89 | //purpose : |
90 | //======================================================================= |
91 | |
92 | BRepBuilderAPI_ShellError BRepBuilderAPI_MakeShell::Error() const |
93 | { |
94 | switch ( myMakeShell.Error()) { |
95 | |
96 | case BRepLib_ShellDone: |
97 | return BRepBuilderAPI_ShellDone; |
98 | |
99 | case BRepLib_EmptyShell: |
100 | return BRepBuilderAPI_EmptyShell; |
101 | |
102 | case BRepLib_DisconnectedShell: |
103 | return BRepBuilderAPI_DisconnectedShell; |
104 | |
105 | case BRepLib_ShellParametersOutOfRange: |
106 | return BRepBuilderAPI_ShellParametersOutOfRange; |
107 | |
108 | } |
109 | |
110 | // portage WNT |
111 | return BRepBuilderAPI_ShellDone; |
112 | } |
113 | |
114 | |
115 | //======================================================================= |
116 | //function : TopoDS_Shell& |
117 | //purpose : |
118 | //======================================================================= |
119 | |
120 | const TopoDS_Shell& BRepBuilderAPI_MakeShell::Shell() const |
121 | { |
122 | return myMakeShell.Shell(); |
123 | } |
124 | |
125 | |
126 | |
127 | //======================================================================= |
128 | //function : TopoDS_Shell |
129 | //purpose : |
130 | //======================================================================= |
131 | |
132 | BRepBuilderAPI_MakeShell::operator TopoDS_Shell() const |
133 | { |
134 | return Shell(); |
135 | } |
136 | |
137 | |