0022627: Change OCCT memory management defaults
[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
1c72dff6
S
93 Create(S : Surface from Geom; TolDegen : Real)
94 ---Purpose: Make a face from a Surface. Accepts tolerance value (TolDegen)
95 -- for resolution of degenerated edges.
96 ---Level: Public
7fd59977 97 returns MakeFace from BRepBuilderAPI;
98
99 ----------------------------------------------
100 -- From a surface and U,V values
101 ----------------------------------------------
102
103 Create(P : Pln from gp; UMin, UMax, VMin, VMax : Real)
104 ---Purpose: Make a face from a plane.
105 ---Level: Public
106 returns MakeFace from BRepBuilderAPI;
107
108 Create(C : Cylinder from gp; UMin, UMax, VMin, VMax : Real)
109 ---Purpose: Make a face from a cylinder.
110 ---Level: Public
111 returns MakeFace from BRepBuilderAPI;
112
113 Create(C : Cone from gp; UMin, UMax, VMin, VMax : Real)
114 ---Purpose: Make a face from a cone.
115 ---Level: Public
116 returns MakeFace from BRepBuilderAPI;
117
118 Create(S : Sphere from gp; UMin, UMax, VMin, VMax : Real)
119 ---Purpose: Make a face from a sphere.
120 ---Level: Public
121 returns MakeFace from BRepBuilderAPI;
122
123 Create(C : Torus from gp; UMin, UMax, VMin, VMax : Real)
124 ---Purpose: Make a face from a torus.
125 ---Level: Public
126 returns MakeFace from BRepBuilderAPI;
127
1c72dff6
S
128 Create(S : Surface from Geom; UMin, UMax, VMin, VMax, TolDegen : Real)
129 ---Purpose: Make a face from a Surface. Accepts tolerance value (TolDegen)
130 -- for resolution of degenerated edges.
131 ---Level: Public
7fd59977 132 returns MakeFace from BRepBuilderAPI;
133
134 ----------------------------------------------
135 -- From a wire
136 ----------------------------------------------
137
138 Create(W : Wire from TopoDS;
139 OnlyPlane : Boolean from Standard = Standard_False)
140 ---Purpose: Find a surface from the wire and make a face.
141 -- if <OnlyPlane> is true, the computed surface will be
142 -- a plane. If it is not possible to find a plane, the
143 -- flag NotDone will be set.
144 ---Level: Public
145 returns MakeFace from BRepBuilderAPI;
146
147 ----------------------------------------------
148 -- From a surface and a wire
149 ----------------------------------------------
150
151 Create(P : Pln from gp; W : Wire from TopoDS;
152 Inside : Boolean = Standard_True)
153 ---Purpose: Make a face from a plane and a wire.
154 ---Level: Public
155 returns MakeFace from BRepBuilderAPI;
156
157 Create(C : Cylinder from gp; W : Wire from TopoDS;
158 Inside : Boolean = Standard_True)
159 ---Purpose: Make a face from a cylinder and a wire.
160 ---Level: Public
161 returns MakeFace from BRepBuilderAPI;
162
163 Create(C : Cone from gp; W : Wire from TopoDS;
164 Inside : Boolean = Standard_True)
165 ---Purpose: Make a face from a cone and a wire.
166 ---Level: Public
167 returns MakeFace from BRepBuilderAPI;
168
169 Create(S : Sphere from gp; W : Wire from TopoDS;
170 Inside : Boolean = Standard_True)
171 ---Purpose: Make a face from a sphere and a wire.
172 ---Level: Public
173 returns MakeFace from BRepBuilderAPI;
174
175 Create(C : Torus from gp; W : Wire from TopoDS;
176 Inside : Boolean = Standard_True)
177 ---Purpose: Make a face from a torus and a wire.
178 ---Level: Public
179 returns MakeFace from BRepBuilderAPI;
180
181 Create(S : Surface from Geom; W : Wire from TopoDS;
182 Inside : Boolean = Standard_True)
183 ---Purpose: Make a face from a Surface and a wire.
184 ---Level: Public
185 returns MakeFace from BRepBuilderAPI;
186
187 ----------------------------------------------
188 -- From face and wire.
189 ----------------------------------------------
190
191 Create(F : Face from TopoDS; W : Wire from TopoDS)
192 ---Purpose: Adds the wire <W> in the face <F>
193 ---Level: Public
194 returns MakeFace from BRepBuilderAPI;
195
196 ---Purpose: A general method to create a face is to give
197 -- - a surface S as the support (the geometric domain) of the face,
198 -- - and a wire W to bound it.
199 -- The bounds of the face can also be defined by four parameter values
200 -- umin, umax, vmin, vmax which determine isoparametric limitations on
201 -- the parametric space of the surface. In this way, a patch is
202 -- defined. The parameter values are optional. If they are omitted, the
203 -- natural bounds of the surface are used. A wire is automatically
204 -- built using the defined bounds. Up to four edges and four vertices
205 -- are created with this wire (no edge is created when the
206 -- corresponding parameter value is infinite).
207 -- Wires can then be added using the function Add to define other
208 -- restrictions on the face. These restrictions represent holes. More
209 -- than one wire may be added by this way, provided that the wires do
210 -- not cross each other and that they define only one area on the
211 -- surface. (Be careful, however, as this is not checked).
212 -- Forbidden addition of wires
213 -- Note that in this schema, the third case is valid if edges of the
214 -- wire W are declared internal to the face. As a result, these edges
215 -- are no longer bounds of the face.
216 -- A default tolerance (Precision::Confusion()) is given to the face,
217 -- this tolerance may be increased during construction of the face
218 -- using various algorithms.
219 -- Rules applied to the arguments
220 -- For the surface:
221 -- - The surface must not be a 'null handle'.
222 -- - If the surface is a trimmed surface, the basis surface is used.
223 -- - For the wire: the wire is composed of connected edges, each
224 -- edge having a parametric curve description in the parametric
225 -- domain of the surface; in other words, as a pcurve.
226 -- For the parameters:
227 -- - The parameter values must be in the parametric range of the
228 -- surface (or the basis surface, if the surface is trimmed). If this
229 -- condition is not satisfied, the face is not built, and the Error
230 -- function will return BRepBuilderAPI_ParametersOutOfRange.
231 -- - The bounding parameters p1 and p2 are adjusted on a periodic
232 -- surface in a given parametric direction by adding or subtracting
233 -- the period to obtain p1 in the parametric range of the surface and
234 -- such p2, that p2 - p1 <= Period, where Period is the period of the
235 -- surface in this parametric direction.
236 -- - A parameter value may be infinite. There will be no edge and
237 -- no vertex in the corresponding direction.
238
239
240 Init(me : in out; F : Face from TopoDS)
241 ---Purpose: Initializes (or reinitializes) the
242 -- construction of a face by creating a new object which is a copy of
243 -- the face F, in order to add wires to it, using the function Add.
244 -- Note: this complete copy of the geometry is only required if you
245 -- want to work on the geometries of the two faces independently.
246 is static;
247
1c72dff6
S
248 Init(me : in out; S : Surface from Geom; Bound : Boolean; TolDegen : Real)
249 ---Purpose: Initializes (or reinitializes) the construction of a face on
250 -- the surface S. If Bound is true, a wire is
251 -- automatically created from the natural bounds of the
252 -- surface S and added to the face in order to bound it. If
253 -- Bound is false, no wire is added. This option is used
254 -- when real bounds are known. These will be added to
255 -- the face after this initialization, using the function Add.
256 -- TolDegen parameter is used for resolution of degenerated edges
257 -- if calculation of natural bounds is turned on.
258 is static;
259
260 Init(me : in out; S : Surface from Geom; UMin, UMax, VMin, VMax, TolDegen : Real)
261 ---Purpose: Initializes (or reinitializes) the construction of a face on
262 -- the surface S, limited in the u parametric direction by
263 -- the two parameter values UMin and UMax and in the
264 -- v parametric direction by the two parameter values VMin and VMax.
265 -- Warning
266 -- Error returns:
267 -- - BRepBuilderAPI_ParametersOutOfRange
268 -- when the parameters given are outside the bounds of the
269 -- surface or the basis surface of a trimmed surface.
270 -- TolDegen parameter is used for resolution of degenerated edges.
7fd59977 271 is static;
272
273 Add(me : in out; W : Wire from TopoDS)
274 ---Purpose: Adds the wire W to the constructed face as a hole.
275 -- Warning
276 -- W must not cross the other bounds of the face, and all
277 -- the bounds must define only one area on the surface.
278 -- (Be careful, however, as this is not checked.)
279 -- Example
280 -- // a cylinder
281 -- gp_Cylinder C = ..;
282 -- // a wire
283 -- TopoDS_Wire W = ...;
284 -- BRepBuilderAPI_MakeFace MF(C);
285 -- MF.Add(W);
286 -- TopoDS_Face F = MF;
287 is static;
288
289
290 ----------------------------------------------
291 -- Results
292 ----------------------------------------------
293
294 IsDone(me) returns Boolean
295 ---Purpose: Returns true if this algorithm has a valid face.
296 is redefined;
297
298 Error(me) returns FaceError from BRepBuilderAPI
299 ---Purpose: Returns the construction status
300 -- BRepBuilderAPI_FaceDone if the face is built, or
301 -- - another value of the BRepBuilderAPI_FaceError
302 -- enumeration indicating why the construction failed, in
303 -- particular when the given parameters are outside the
304 -- bounds of the surface.
305 is static;
306
307 Face(me) returns Face from TopoDS
308 ---C++: return const &
309 ---C++: alias "Standard_EXPORT operator TopoDS_Face() const;"
310 ---Purpose: Returns the constructed face.
311 -- Exceptions
312 -- StdFail_NotDone if no face is built.
313 raises
314 NotDone from StdFail
315 is static;
316
317fields
318 myMakeFace : MakeFace from BRepLib;
319
320end MakeFace;