Test for 0022778: Bug in BRepMesh
[occt.git] / src / BRepLib / BRepLib_MakeFace.cdl
1 -- Created on: 1993-07-12
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23 class MakeFace from BRepLib inherits MakeShape from BRepLib 
24
25         ---Purpose: Provides methods to build faces.
26         --          
27         --          A face may be built :
28         --          
29         --          * From a surface.
30         --          
31         --             - Elementary surface from gp.
32         --             
33         --             - Surface from Geom.
34         --             
35         --          * From a surface and U,V values.
36         --          
37         --          * From a wire.
38         --            
39         --            - Find the surface automatically if possible.
40         --          
41         --          * From a surface and a wire.
42         --          
43         --            - A flag Inside is given, when this flag is True
44         --            the  wire is  oriented to bound a finite area on
45         --            the surface.
46         --          
47         --          * From a face and a wire.
48         --            
49         --            - The new wire is a perforation.
50
51 uses
52     Pln       from gp,
53     Cylinder  from gp,
54     Cone      from gp,
55     Sphere    from gp,
56     Torus     from gp,
57     Surface   from Geom,
58     Face      from TopoDS,
59     Wire      from TopoDS,
60     FaceError from BRepLib
61     
62 raises
63     NotDone    from StdFail
64
65 is
66
67     Create  
68         ---Purpose: Not done.
69         ---Level: Public
70     returns MakeFace from BRepLib;
71     
72     Create(F : Face from TopoDS)  
73         ---Purpose: Load a face. Usefull to add wires.
74         ---Level: Public
75     returns MakeFace from BRepLib;
76
77     ----------------------------------------------
78     -- From a surface
79     ----------------------------------------------
80
81     Create(P : Pln from gp)
82         ---Purpose: Make a face from a plane.
83         ---Level: Public
84     returns MakeFace from BRepLib;
85
86     Create(C : Cylinder from gp)
87         ---Purpose: Make a face from a cylinder.
88         ---Level: Public
89     returns MakeFace from BRepLib;
90
91     Create(C : Cone from gp)
92         ---Purpose: Make a face from a cone.
93         ---Level: Public
94     returns MakeFace from BRepLib;
95
96     Create(S : Sphere from gp)
97         ---Purpose: Make a face from a sphere.
98         ---Level: Public
99     returns MakeFace from BRepLib;
100
101     Create(C : Torus from gp)
102         ---Purpose: Make a face from a torus.
103         ---Level: Public
104     returns MakeFace from BRepLib;
105
106     Create(S : Surface from Geom; TolDegen : Real)
107     ---Purpose: Make a face from a Surface. Accepts tolerance value (TolDegen)
108     --          for resolution of degenerated edges.
109     ---Level: Public
110     returns MakeFace from BRepLib;
111
112     ----------------------------------------------
113     -- From a surface and U,V values
114     ----------------------------------------------
115
116     Create(P : Pln from gp; UMin, UMax, VMin, VMax : Real)
117         ---Purpose: Make a face from a plane.
118         ---Level: Public
119     returns MakeFace from BRepLib;
120
121     Create(C : Cylinder from gp; UMin, UMax, VMin, VMax : Real)
122         ---Purpose: Make a face from a cylinder.
123         ---Level: Public
124     returns MakeFace from BRepLib;
125
126     Create(C : Cone from gp; UMin, UMax, VMin, VMax : Real)
127         ---Purpose: Make a face from a cone.
128         ---Level: Public
129     returns MakeFace from BRepLib;
130
131     Create(S : Sphere from gp; UMin, UMax, VMin, VMax : Real)
132         ---Purpose: Make a face from a sphere.
133         ---Level: Public
134     returns MakeFace from BRepLib;
135
136     Create(C : Torus from gp; UMin, UMax, VMin, VMax : Real)
137         ---Purpose: Make a face from a torus.
138         ---Level: Public
139     returns MakeFace from BRepLib;
140
141     Create(S : Surface from Geom; UMin, UMax, VMin, VMax, TolDegen : Real)
142     ---Purpose: Make a face from a Surface. Accepts min & max parameters
143     --          to construct the face's bounds. Also accepts tolerance value (TolDegen)
144     --          for resolution of degenerated edges.
145     ---Level: Public
146     returns MakeFace from BRepLib;
147
148     ----------------------------------------------
149     -- From a wire
150     ----------------------------------------------
151
152     Create(W         : Wire    from TopoDS;
153            OnlyPlane : Boolean from Standard = Standard_False)
154         ---Purpose: Find a surface from the wire and make a face.
155         --          if <OnlyPlane> is true, the computed surface will be
156         --          a plane. If it is not possible to find a plane, the
157         --          flag NotDone will be set.
158         ---Level: Public
159     returns MakeFace from BRepLib;
160
161     ----------------------------------------------
162     -- From a surface and a wire
163     ----------------------------------------------
164
165     Create(P : Pln from gp; W : Wire from TopoDS;
166            Inside : Boolean = Standard_True)
167         ---Purpose: Make a face from a plane and a wire.
168         ---Level: Public
169     returns MakeFace from BRepLib;
170
171     Create(C : Cylinder from gp; W : Wire from TopoDS;
172            Inside : Boolean = Standard_True)
173         ---Purpose: Make a face from a cylinder and a wire.
174         ---Level: Public
175     returns MakeFace from BRepLib;
176
177     Create(C : Cone from gp; W : Wire from TopoDS;
178            Inside : Boolean = Standard_True)
179         ---Purpose: Make a face from a cone and a wire.
180         ---Level: Public
181     returns MakeFace from BRepLib;
182
183     Create(S : Sphere from gp; W : Wire from TopoDS;
184            Inside : Boolean = Standard_True)
185         ---Purpose: Make a face from a sphere and a wire.
186         ---Level: Public
187     returns MakeFace from BRepLib;
188
189     Create(C : Torus from gp; W : Wire from TopoDS;
190            Inside : Boolean = Standard_True)
191         ---Purpose: Make a face from a torus and a wire.
192         ---Level: Public
193     returns MakeFace from BRepLib;
194
195     Create(S : Surface from Geom; W : Wire from TopoDS;
196            Inside : Boolean = Standard_True)
197         ---Purpose: Make a face from a Surface and a wire.
198         ---Level: Public
199     returns MakeFace from BRepLib;
200
201     ----------------------------------------------
202     -- From face and wire.
203     ----------------------------------------------
204
205     Create(F : Face from TopoDS; W : Wire from TopoDS)
206         ---Purpose: Adds the wire <W> in the face <F>
207         ---Level: Public
208     returns MakeFace from BRepLib;
209     
210     ----------------------------------------------
211     -- Auxiliary methods
212     ----------------------------------------------
213
214     Init(me : in out; F : Face from TopoDS)
215         ---Purpose: Load the face.
216         ---Level: Public
217     is static;
218
219     Init(me : in out; S : Surface from Geom; Bound : Boolean; TolDegen : Real)
220     ---Purpose: Creates the face  from the  surface. If Bound is
221     --          True a wire is made from the natural bounds.
222     --          Accepts tolerance value (TolDegen) for resolution
223     --          of degenerated edges.
224     ---Level: Public
225     is static;
226
227     Init(me : in out; S : Surface from Geom; UMin, UMax, VMin, VMax, TolDegen : Real) 
228     ---Purpose: Creates the face from the surface and the min-max
229     --          values. Accepts tolerance value (TolDegen) for resolution
230     --          of degenerated edges.
231     ---Level: Public
232     is static;
233
234     Add(me : in out; W : Wire from TopoDS)
235         ---Purpose: Adds the wire <W> in the current face.
236         ---Level: Public
237     is static;
238
239     ----------------------------------------------
240     -- Auxiliary methods
241     ----------------------------------------------
242
243     CheckInside(me : in out)
244         ---Purpose: Reorient the current face if  the boundary  is not
245         --          finite.
246         ---Level: Public
247     is static private;
248
249     ----------------------------------------------
250     -- Results
251     ----------------------------------------------
252
253     Error(me) returns FaceError from BRepLib
254         ---Level: Public
255     is static;
256
257     Face(me) returns Face from TopoDS
258         ---Purpose: Returns the new face.
259         --          
260         ---C++: return const &
261         ---C++: alias "Standard_EXPORT operator TopoDS_Face() const;"
262         ---Level: Public
263     raises 
264         NotDone from StdFail
265     is static;
266     
267 fields
268     myError    : FaceError from BRepLib;
269 end MakeFace;