0024428: Implementation of LGPL license
[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-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class MakeFace from BRepLib inherits MakeShape from BRepLib 
18
19         ---Purpose: Provides methods to build faces.
20         --          
21         --          A face may be built :
22         --          
23         --          * From a surface.
24         --          
25         --             - Elementary surface from gp.
26         --             
27         --             - Surface from Geom.
28         --             
29         --          * From a surface and U,V values.
30         --          
31         --          * From a wire.
32         --            
33         --            - Find the surface automatically if possible.
34         --          
35         --          * From a surface and a wire.
36         --          
37         --            - A flag Inside is given, when this flag is True
38         --            the  wire is  oriented to bound a finite area on
39         --            the surface.
40         --          
41         --          * From a face and a wire.
42         --            
43         --            - The new wire is a perforation.
44
45 uses
46     Pln       from gp,
47     Cylinder  from gp,
48     Cone      from gp,
49     Sphere    from gp,
50     Torus     from gp,
51     Surface   from Geom,
52     Face      from TopoDS,
53     Wire      from TopoDS,
54     FaceError from BRepLib
55     
56 raises
57     NotDone    from StdFail
58
59 is
60
61     Create  
62         ---Purpose: Not done.
63         ---Level: Public
64     returns MakeFace from BRepLib;
65     
66     Create(F : Face from TopoDS)  
67         ---Purpose: Load a face. Usefull to add wires.
68         ---Level: Public
69     returns MakeFace from BRepLib;
70
71     ----------------------------------------------
72     -- From a surface
73     ----------------------------------------------
74
75     Create(P : Pln from gp)
76         ---Purpose: Make a face from a plane.
77         ---Level: Public
78     returns MakeFace from BRepLib;
79
80     Create(C : Cylinder from gp)
81         ---Purpose: Make a face from a cylinder.
82         ---Level: Public
83     returns MakeFace from BRepLib;
84
85     Create(C : Cone from gp)
86         ---Purpose: Make a face from a cone.
87         ---Level: Public
88     returns MakeFace from BRepLib;
89
90     Create(S : Sphere from gp)
91         ---Purpose: Make a face from a sphere.
92         ---Level: Public
93     returns MakeFace from BRepLib;
94
95     Create(C : Torus from gp)
96         ---Purpose: Make a face from a torus.
97         ---Level: Public
98     returns MakeFace from BRepLib;
99
100     Create(S : Surface from Geom; TolDegen : Real)
101     ---Purpose: Make a face from a Surface. Accepts tolerance value (TolDegen)
102     --          for resolution of degenerated edges.
103     ---Level: Public
104     returns MakeFace from BRepLib;
105
106     ----------------------------------------------
107     -- From a surface and U,V values
108     ----------------------------------------------
109
110     Create(P : Pln from gp; UMin, UMax, VMin, VMax : Real)
111         ---Purpose: Make a face from a plane.
112         ---Level: Public
113     returns MakeFace from BRepLib;
114
115     Create(C : Cylinder from gp; UMin, UMax, VMin, VMax : Real)
116         ---Purpose: Make a face from a cylinder.
117         ---Level: Public
118     returns MakeFace from BRepLib;
119
120     Create(C : Cone from gp; UMin, UMax, VMin, VMax : Real)
121         ---Purpose: Make a face from a cone.
122         ---Level: Public
123     returns MakeFace from BRepLib;
124
125     Create(S : Sphere from gp; UMin, UMax, VMin, VMax : Real)
126         ---Purpose: Make a face from a sphere.
127         ---Level: Public
128     returns MakeFace from BRepLib;
129
130     Create(C : Torus from gp; UMin, UMax, VMin, VMax : Real)
131         ---Purpose: Make a face from a torus.
132         ---Level: Public
133     returns MakeFace from BRepLib;
134
135     Create(S : Surface from Geom; UMin, UMax, VMin, VMax, TolDegen : Real)
136     ---Purpose: Make a face from a Surface. Accepts min & max parameters
137     --          to construct the face's bounds. Also accepts tolerance value (TolDegen)
138     --          for resolution of degenerated edges.
139     ---Level: Public
140     returns MakeFace from BRepLib;
141
142     ----------------------------------------------
143     -- From a wire
144     ----------------------------------------------
145
146     Create(W         : Wire    from TopoDS;
147            OnlyPlane : Boolean from Standard = Standard_False)
148         ---Purpose: Find a surface from the wire and make a face.
149         --          if <OnlyPlane> is true, the computed surface will be
150         --          a plane. If it is not possible to find a plane, the
151         --          flag NotDone will be set.
152         ---Level: Public
153     returns MakeFace from BRepLib;
154
155     ----------------------------------------------
156     -- From a surface and a wire
157     ----------------------------------------------
158
159     Create(P : Pln from gp; W : Wire from TopoDS;
160            Inside : Boolean = Standard_True)
161         ---Purpose: Make a face from a plane and a wire.
162         ---Level: Public
163     returns MakeFace from BRepLib;
164
165     Create(C : Cylinder from gp; W : Wire from TopoDS;
166            Inside : Boolean = Standard_True)
167         ---Purpose: Make a face from a cylinder and a wire.
168         ---Level: Public
169     returns MakeFace from BRepLib;
170
171     Create(C : Cone from gp; W : Wire from TopoDS;
172            Inside : Boolean = Standard_True)
173         ---Purpose: Make a face from a cone and a wire.
174         ---Level: Public
175     returns MakeFace from BRepLib;
176
177     Create(S : Sphere from gp; W : Wire from TopoDS;
178            Inside : Boolean = Standard_True)
179         ---Purpose: Make a face from a sphere and a wire.
180         ---Level: Public
181     returns MakeFace from BRepLib;
182
183     Create(C : Torus from gp; W : Wire from TopoDS;
184            Inside : Boolean = Standard_True)
185         ---Purpose: Make a face from a torus and a wire.
186         ---Level: Public
187     returns MakeFace from BRepLib;
188
189     Create(S : Surface from Geom; W : Wire from TopoDS;
190            Inside : Boolean = Standard_True)
191         ---Purpose: Make a face from a Surface and a wire.
192         ---Level: Public
193     returns MakeFace from BRepLib;
194
195     ----------------------------------------------
196     -- From face and wire.
197     ----------------------------------------------
198
199     Create(F : Face from TopoDS; W : Wire from TopoDS)
200         ---Purpose: Adds the wire <W> in the face <F>
201         ---Level: Public
202     returns MakeFace from BRepLib;
203     
204     ----------------------------------------------
205     -- Auxiliary methods
206     ----------------------------------------------
207
208     Init(me : in out; F : Face from TopoDS)
209         ---Purpose: Load the face.
210         ---Level: Public
211     is static;
212
213     Init(me : in out; S : Surface from Geom; Bound : Boolean; TolDegen : Real)
214     ---Purpose: Creates the face  from the  surface. If Bound is
215     --          True a wire is made from the natural bounds.
216     --          Accepts tolerance value (TolDegen) for resolution
217     --          of degenerated edges.
218     ---Level: Public
219     is static;
220
221     Init(me : in out; S : Surface from Geom; UMin, UMax, VMin, VMax, TolDegen : Real) 
222     ---Purpose: Creates the face from the surface and the min-max
223     --          values. Accepts tolerance value (TolDegen) for resolution
224     --          of degenerated edges.
225     ---Level: Public
226     is static;
227
228     Add(me : in out; W : Wire from TopoDS)
229         ---Purpose: Adds the wire <W> in the current face.
230         ---Level: Public
231     is static;
232
233     ----------------------------------------------
234     -- Auxiliary methods
235     ----------------------------------------------
236
237     CheckInside(me : in out)
238         ---Purpose: Reorient the current face if  the boundary  is not
239         --          finite.
240         ---Level: Public
241     is static private;
242
243     ----------------------------------------------
244     -- Results
245     ----------------------------------------------
246
247     Error(me) returns FaceError from BRepLib
248         ---Level: Public
249     is static;
250
251     Face(me) returns Face from TopoDS
252         ---Purpose: Returns the new face.
253         --          
254         ---C++: return const &
255         ---C++: alias "Standard_EXPORT operator TopoDS_Face() const;"
256         ---Level: Public
257     raises 
258         NotDone from StdFail
259     is static;
260     
261 fields
262     myError    : FaceError from BRepLib;
263 end MakeFace;