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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MakeFace from BRepLib inherits MakeShape from BRepLib
19 ---Purpose: Provides methods to build faces.
21 -- A face may be built :
25 -- - Elementary surface from gp.
27 -- - Surface from Geom.
29 -- * From a surface and U,V values.
33 -- - Find the surface automatically if possible.
35 -- * From a surface and a wire.
37 -- - A flag Inside is given, when this flag is True
38 -- the wire is oriented to bound a finite area on
41 -- * From a face and a wire.
43 -- - The new wire is a perforation.
54 FaceError from BRepLib
64 returns MakeFace from BRepLib;
66 Create(F : Face from TopoDS)
67 ---Purpose: Load a face. Usefull to add wires.
69 returns MakeFace from BRepLib;
71 ----------------------------------------------
73 ----------------------------------------------
75 Create(P : Pln from gp)
76 ---Purpose: Make a face from a plane.
78 returns MakeFace from BRepLib;
80 Create(C : Cylinder from gp)
81 ---Purpose: Make a face from a cylinder.
83 returns MakeFace from BRepLib;
85 Create(C : Cone from gp)
86 ---Purpose: Make a face from a cone.
88 returns MakeFace from BRepLib;
90 Create(S : Sphere from gp)
91 ---Purpose: Make a face from a sphere.
93 returns MakeFace from BRepLib;
95 Create(C : Torus from gp)
96 ---Purpose: Make a face from a torus.
98 returns MakeFace from BRepLib;
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.
104 returns MakeFace from BRepLib;
106 ----------------------------------------------
107 -- From a surface and U,V values
108 ----------------------------------------------
110 Create(P : Pln from gp; UMin, UMax, VMin, VMax : Real)
111 ---Purpose: Make a face from a plane.
113 returns MakeFace from BRepLib;
115 Create(C : Cylinder from gp; UMin, UMax, VMin, VMax : Real)
116 ---Purpose: Make a face from a cylinder.
118 returns MakeFace from BRepLib;
120 Create(C : Cone from gp; UMin, UMax, VMin, VMax : Real)
121 ---Purpose: Make a face from a cone.
123 returns MakeFace from BRepLib;
125 Create(S : Sphere from gp; UMin, UMax, VMin, VMax : Real)
126 ---Purpose: Make a face from a sphere.
128 returns MakeFace from BRepLib;
130 Create(C : Torus from gp; UMin, UMax, VMin, VMax : Real)
131 ---Purpose: Make a face from a torus.
133 returns MakeFace from BRepLib;
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.
140 returns MakeFace from BRepLib;
142 ----------------------------------------------
144 ----------------------------------------------
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.
153 returns MakeFace from BRepLib;
155 ----------------------------------------------
156 -- From a surface and a wire
157 ----------------------------------------------
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.
163 returns MakeFace from BRepLib;
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.
169 returns MakeFace from BRepLib;
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.
175 returns MakeFace from BRepLib;
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.
181 returns MakeFace from BRepLib;
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.
187 returns MakeFace from BRepLib;
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.
193 returns MakeFace from BRepLib;
195 ----------------------------------------------
196 -- From face and wire.
197 ----------------------------------------------
199 Create(F : Face from TopoDS; W : Wire from TopoDS)
200 ---Purpose: Adds the wire <W> in the face <F>
202 returns MakeFace from BRepLib;
204 ----------------------------------------------
206 ----------------------------------------------
208 Init(me : in out; F : Face from TopoDS)
209 ---Purpose: Load the face.
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.
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.
228 Add(me : in out; W : Wire from TopoDS)
229 ---Purpose: Adds the wire <W> in the current face.
233 ----------------------------------------------
235 ----------------------------------------------
237 CheckInside(me : in out)
238 ---Purpose: Reorient the current face if the boundary is not
243 ----------------------------------------------
245 ----------------------------------------------
247 Error(me) returns FaceError from BRepLib
251 Face(me) returns Face from TopoDS
252 ---Purpose: Returns the new face.
254 ---C++: return const &
255 ---C++: alias "Standard_EXPORT operator TopoDS_Face() const;"
262 myError : FaceError from BRepLib;