Integration of OCCT 6.5.0 from SVN
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_MakeFace.cdl
CommitLineData
7fd59977 1-- File: BRepBuilderAPI_MakeFace.cdl
2-- Created: Mon Jul 12 11:35:23 1993
3-- Author: Remi LEQUETTE
4-- <rle@nonox>
5-- xab: 29Nov96 correction de doc
6---Copyright: Matra Datavision 1993
7
8
9class MakeFace from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI
10
11 ---Purpose: Provides methods to build faces.
12 --
13 -- A face may be built :
14 --
15 -- * From a surface.
16 --
17 -- - Elementary surface from gp.
18 --
19 -- - Surface from Geom.
20 --
21 -- * From a surface and U,V values.
22 --
23 -- * From a wire.
24 --
25 -- - Find the surface automatically if possible.
26 --
27 -- * From a surface and a wire.
28 --
29 -- - A flag Inside is given, when this flag is True
30 -- the wire is oriented to bound a finite area on
31 -- the surface.
32 --
33 -- * From a face and a wire.
34 --
35 -- - The new wire is a perforation.
36
37uses
38 Pln from gp,
39 Cylinder from gp,
40 Cone from gp,
41 Sphere from gp,
42 Torus from gp,
43 Surface from Geom,
44 Face from TopoDS,
45 Wire from TopoDS,
46 FaceError from BRepBuilderAPI,
47 MakeFace from BRepLib
48
49raises
50 NotDone from StdFail
51
52is
53
54 Create
55 ---Purpose: Not done.
56 ---Level: Public
57 returns MakeFace from BRepBuilderAPI;
58
59 Create(F : Face from TopoDS)
60 ---Purpose: Load a face. Usefull to add wires.
61 ---Level: Public
62 returns MakeFace from BRepBuilderAPI;
63
64 ----------------------------------------------
65 -- From a surface
66 ----------------------------------------------
67
68 Create(P : Pln from gp)
69 ---Purpose: Make a face from a plane.
70 ---Level: Public
71 returns MakeFace from BRepBuilderAPI;
72
73 Create(C : Cylinder from gp)
74 ---Purpose: Make a face from a cylinder.
75 ---Level: Public
76 returns MakeFace from BRepBuilderAPI;
77
78 Create(C : Cone from gp)
79 ---Purpose: Make a face from a cone.
80 ---Level: Public
81 returns MakeFace from BRepBuilderAPI;
82
83 Create(S : Sphere from gp)
84 ---Purpose: Make a face from a sphere.
85 ---Level: Public
86 returns MakeFace from BRepBuilderAPI;
87
88 Create(C : Torus from gp)
89 ---Purpose: Make a face from a torus.
90 ---Level: Public
91 returns MakeFace from BRepBuilderAPI;
92
93 Create(S : Surface from Geom)
94 ---Purpose: Make a face from a Surface.
95 ---Level: Public
96 returns MakeFace from BRepBuilderAPI;
97
98 ----------------------------------------------
99 -- From a surface and U,V values
100 ----------------------------------------------
101
102 Create(P : Pln from gp; UMin, UMax, VMin, VMax : Real)
103 ---Purpose: Make a face from a plane.
104 ---Level: Public
105 returns MakeFace from BRepBuilderAPI;
106
107 Create(C : Cylinder from gp; UMin, UMax, VMin, VMax : Real)
108 ---Purpose: Make a face from a cylinder.
109 ---Level: Public
110 returns MakeFace from BRepBuilderAPI;
111
112 Create(C : Cone from gp; UMin, UMax, VMin, VMax : Real)
113 ---Purpose: Make a face from a cone.
114 ---Level: Public
115 returns MakeFace from BRepBuilderAPI;
116
117 Create(S : Sphere from gp; UMin, UMax, VMin, VMax : Real)
118 ---Purpose: Make a face from a sphere.
119 ---Level: Public
120 returns MakeFace from BRepBuilderAPI;
121
122 Create(C : Torus from gp; UMin, UMax, VMin, VMax : Real)
123 ---Purpose: Make a face from a torus.
124 ---Level: Public
125 returns MakeFace from BRepBuilderAPI;
126
127 Create(S : Surface from Geom; UMin, UMax, VMin, VMax : Real)
128 ---Purpose: Make a face from a Surface.
129 ---Level: Public
130 returns MakeFace from BRepBuilderAPI;
131
132 ----------------------------------------------
133 -- From a wire
134 ----------------------------------------------
135
136 Create(W : Wire from TopoDS;
137 OnlyPlane : Boolean from Standard = Standard_False)
138 ---Purpose: Find a surface from the wire and make a face.
139 -- if <OnlyPlane> is true, the computed surface will be
140 -- a plane. If it is not possible to find a plane, the
141 -- flag NotDone will be set.
142 ---Level: Public
143 returns MakeFace from BRepBuilderAPI;
144
145 ----------------------------------------------
146 -- From a surface and a wire
147 ----------------------------------------------
148
149 Create(P : Pln from gp; W : Wire from TopoDS;
150 Inside : Boolean = Standard_True)
151 ---Purpose: Make a face from a plane and a wire.
152 ---Level: Public
153 returns MakeFace from BRepBuilderAPI;
154
155 Create(C : Cylinder from gp; W : Wire from TopoDS;
156 Inside : Boolean = Standard_True)
157 ---Purpose: Make a face from a cylinder and a wire.
158 ---Level: Public
159 returns MakeFace from BRepBuilderAPI;
160
161 Create(C : Cone from gp; W : Wire from TopoDS;
162 Inside : Boolean = Standard_True)
163 ---Purpose: Make a face from a cone and a wire.
164 ---Level: Public
165 returns MakeFace from BRepBuilderAPI;
166
167 Create(S : Sphere from gp; W : Wire from TopoDS;
168 Inside : Boolean = Standard_True)
169 ---Purpose: Make a face from a sphere and a wire.
170 ---Level: Public
171 returns MakeFace from BRepBuilderAPI;
172
173 Create(C : Torus from gp; W : Wire from TopoDS;
174 Inside : Boolean = Standard_True)
175 ---Purpose: Make a face from a torus and a wire.
176 ---Level: Public
177 returns MakeFace from BRepBuilderAPI;
178
179 Create(S : Surface from Geom; W : Wire from TopoDS;
180 Inside : Boolean = Standard_True)
181 ---Purpose: Make a face from a Surface and a wire.
182 ---Level: Public
183 returns MakeFace from BRepBuilderAPI;
184
185 ----------------------------------------------
186 -- From face and wire.
187 ----------------------------------------------
188
189 Create(F : Face from TopoDS; W : Wire from TopoDS)
190 ---Purpose: Adds the wire <W> in the face <F>
191 ---Level: Public
192 returns MakeFace from BRepBuilderAPI;
193
194 ---Purpose: A general method to create a face is to give
195 -- - a surface S as the support (the geometric domain) of the face,
196 -- - and a wire W to bound it.
197 -- The bounds of the face can also be defined by four parameter values
198 -- umin, umax, vmin, vmax which determine isoparametric limitations on
199 -- the parametric space of the surface. In this way, a patch is
200 -- defined. The parameter values are optional. If they are omitted, the
201 -- natural bounds of the surface are used. A wire is automatically
202 -- built using the defined bounds. Up to four edges and four vertices
203 -- are created with this wire (no edge is created when the
204 -- corresponding parameter value is infinite).
205 -- Wires can then be added using the function Add to define other
206 -- restrictions on the face. These restrictions represent holes. More
207 -- than one wire may be added by this way, provided that the wires do
208 -- not cross each other and that they define only one area on the
209 -- surface. (Be careful, however, as this is not checked).
210 -- Forbidden addition of wires
211 -- Note that in this schema, the third case is valid if edges of the
212 -- wire W are declared internal to the face. As a result, these edges
213 -- are no longer bounds of the face.
214 -- A default tolerance (Precision::Confusion()) is given to the face,
215 -- this tolerance may be increased during construction of the face
216 -- using various algorithms.
217 -- Rules applied to the arguments
218 -- For the surface:
219 -- - The surface must not be a 'null handle'.
220 -- - If the surface is a trimmed surface, the basis surface is used.
221 -- - For the wire: the wire is composed of connected edges, each
222 -- edge having a parametric curve description in the parametric
223 -- domain of the surface; in other words, as a pcurve.
224 -- For the parameters:
225 -- - The parameter values must be in the parametric range of the
226 -- surface (or the basis surface, if the surface is trimmed). If this
227 -- condition is not satisfied, the face is not built, and the Error
228 -- function will return BRepBuilderAPI_ParametersOutOfRange.
229 -- - The bounding parameters p1 and p2 are adjusted on a periodic
230 -- surface in a given parametric direction by adding or subtracting
231 -- the period to obtain p1 in the parametric range of the surface and
232 -- such p2, that p2 - p1 <= Period, where Period is the period of the
233 -- surface in this parametric direction.
234 -- - A parameter value may be infinite. There will be no edge and
235 -- no vertex in the corresponding direction.
236
237
238 Init(me : in out; F : Face from TopoDS)
239 ---Purpose: Initializes (or reinitializes) the
240 -- construction of a face by creating a new object which is a copy of
241 -- the face F, in order to add wires to it, using the function Add.
242 -- Note: this complete copy of the geometry is only required if you
243 -- want to work on the geometries of the two faces independently.
244 is static;
245
246 Init(me : in out; S : Surface from Geom; Bound : Boolean = Standard_True)
247 ---Purpose: Initializes (or reinitializes) the construction of a face on
248 -- the surface S. If Bound is true (the default value), a wire is
249 -- automatically created from the natural bounds of the
250 -- surface S and added to the face in order to bound it. If
251 -- Bound is false, no wire is added. This option is used
252 -- when real bounds are known. These will be added to
253 -- the face after this initialization, using the function Add.
254 is static;
255
256 Init(me : in out; S : Surface from Geom; UMin, UMax, VMin, VMax : Real)
257 ---Purpose: Initializes (or reinitializes) the construction of a face on
258 -- the surface S, limited in the u parametric direction by
259 -- the two parameter values UMin and UMax and in the
260 -- v parametric direction by the two parameter values VMin and VMax.
261 -- Warning
262 -- Error returns:
263 -- - BRepBuilderAPI_ParametersOutOfRange
264 -- when the parameters given are outside the bounds of the
265 -- surface or the basis surface of a trimmed surface.
266 is static;
267
268 Add(me : in out; W : Wire from TopoDS)
269 ---Purpose: Adds the wire W to the constructed face as a hole.
270 -- Warning
271 -- W must not cross the other bounds of the face, and all
272 -- the bounds must define only one area on the surface.
273 -- (Be careful, however, as this is not checked.)
274 -- Example
275 -- // a cylinder
276 -- gp_Cylinder C = ..;
277 -- // a wire
278 -- TopoDS_Wire W = ...;
279 -- BRepBuilderAPI_MakeFace MF(C);
280 -- MF.Add(W);
281 -- TopoDS_Face F = MF;
282 is static;
283
284
285 ----------------------------------------------
286 -- Results
287 ----------------------------------------------
288
289 IsDone(me) returns Boolean
290 ---Purpose: Returns true if this algorithm has a valid face.
291 is redefined;
292
293 Error(me) returns FaceError from BRepBuilderAPI
294 ---Purpose: Returns the construction status
295 -- BRepBuilderAPI_FaceDone if the face is built, or
296 -- - another value of the BRepBuilderAPI_FaceError
297 -- enumeration indicating why the construction failed, in
298 -- particular when the given parameters are outside the
299 -- bounds of the surface.
300 is static;
301
302 Face(me) returns Face from TopoDS
303 ---C++: return const &
304 ---C++: alias "Standard_EXPORT operator TopoDS_Face() const;"
305 ---Purpose: Returns the constructed face.
306 -- Exceptions
307 -- StdFail_NotDone if no face is built.
308 raises
309 NotDone from StdFail
310 is static;
311
312fields
313 myMakeFace : MakeFace from BRepLib;
314
315end MakeFace;