0024964: ThruSections crashes the DRAW.exe
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeFilling.cdl
CommitLineData
b311480e 1-- Created on: 1998-08-26
2-- Created by: Julia GERASIMOVA
3-- Copyright (c) 1998-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class MakeFilling from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI
18
19 ---Purpose: N-Side Filling
20 -- This algorithm avoids to build a face from:
21 -- * a set of edges defining the bounds of the face and some
22 -- constraints the surface of the face has to satisfy
23 -- * a set of edges and points defining some constraints
24 -- the support surface has to satisfy
25 -- * an initial surface to deform for satisfying the constraints
26 -- * a set of parameters to control the constraints.
27 --
28 -- The support surface of the face is computed by deformation
29 -- of the initial surface in order to satisfy the given constraints.
30 -- The set of bounding edges defines the wire of the face.
31 --
32 -- If no initial surface is given, the algorithm computes it
33 -- automatically.
34 -- If the set of edges is not connected (Free constraint)
35 -- missing edges are automatically computed.
36 --
37 -- Limitations:
38 -- * If some constraints are not compatible
39 -- The algorithm does not take them into account.
40 -- So the constraints will not be satisfyed in an area containing
41 -- the incompatibilitries.
42 -- * The constraints defining the bound of the face have to be
43 -- entered in order to have a continuous wire.
44 --
45 -- Other Applications:
46 -- * Deformation of a face to satisfy internal constraints
47 -- * Deformation of a face to improve Gi continuity with
48 -- connected faces
49
50 ---Level: Advanced
51
52uses
53 Shape from TopoDS,
54 Edge from TopoDS,
55 Face from TopoDS,
56 Pnt from gp,
57 Shape from GeomAbs,
01697018 58 ListOfShape from TopTools,
7fd59977 59 Filling from BRepFill
60
61raises
62 NotDone,
63 OutOfRange,
64 ConstructionError
65
66is
67 Create( Degree : Integer from Standard = 3;
68 NbPtsOnCur : Integer from Standard = 15;
69 NbIter : Integer from Standard = 2;
70 Anisotropie : Boolean from Standard = Standard_False;
71 Tol2d : Real from Standard = 0.00001;
72 Tol3d : Real from Standard = 0.0001;
73 TolAng : Real from Standard = 0.01;
74 TolCurv : Real from Standard = 0.1;
75 MaxDeg : Integer from Standard = 8;
76 MaxSegments : Integer from Standard = 9 )
77 ---Purpose: Constructs a wire filling object defined by
78 -- - the energy minimizing criterion Degree
79 -- - the number of points on the curve NbPntsOnCur
80 -- - the number of iterations NbIter
81 -- - the Boolean Anisotropie
82 -- - the 2D tolerance Tol2d
83 -- - the 3D tolerance Tol3d
84 -- - the angular tolerance TolAng
85 -- - the tolerance for curvature TolCur
86 -- - the highest polynomial degree MaxDeg
87 -- - the greatest number of segments MaxSeg.
88 -- If the Boolean Anistropie is true, the algorithm's
89 -- performance is better in cases where the ratio of the
90 -- length U and the length V indicate a great difference
91 -- between the two. In other words, when the surface is, for
92 -- example, extremely long.
93 returns MakeFilling from BRepOffsetAPI;
94
95
96 SetConstrParam( me : in out; Tol2d : Real from Standard = 0.00001;
97 Tol3d : Real from Standard = 0.0001;
98 TolAng : Real from Standard = 0.01;
99 TolCurv : Real from Standard = 0.1 );
100 ---Purpose: Sets the values of Tolerances used to control the constraint.
101 -- Tol2d:
102 -- Tol3d: it is the maximum distance allowed between the support surface
103 -- and the constraints
104 -- TolAng: it is the maximum angle allowed between the normal of the surface
105 -- and the constraints
106 -- TolCurv: it is the maximum difference of curvature allowed between
107 -- the surface and the constraint
108
109 SetResolParam( me : in out; Degree : Integer from Standard = 3;
110 NbPtsOnCur : Integer from Standard = 15;
111 NbIter : Integer from Standard = 2;
112 Anisotropie : Boolean from Standard = Standard_False );
113 ---Purpose: Sets the parameters used for resolution.
114 -- The default values of these parameters have been chosen for a good
115 -- ratio quality/performance.
116 -- Degree: it is the order of energy criterion to minimize for computing
117 -- the deformation of the surface.
118 -- The default value is 3
119 -- The recommanded value is i+2 where i is the maximum order of the
120 -- constraints.
121 -- NbPtsOnCur: it is the average number of points for discretisation
122 -- of the edges.
123 -- NbIter: it is the maximum number of iterations of the process.
124 -- For each iteration the number of discretisation points is
125 -- increased.
126 -- Anisotropie:
127
128 SetApproxParam( me : in out; MaxDeg : Integer from Standard = 8;
129 MaxSegments : Integer from Standard = 9 );
130 ---Purpose: Sets the parameters used to approximate the filling
131 -- surface. These include:
132 -- - MaxDeg - the highest degree which the polynomial
133 -- defining the filling surface can have
134 -- - MaxSegments - the greatest number of segments
135 -- which the filling surface can have.
136
137
138 LoadInitSurface( me : in out; Surf : Face from TopoDS );
139 ---Purpose: Loads the initial surface Surf to
140 -- begin the construction of the surface.
141 -- This optional function is useful if the surface resulting from
142 -- construction for the algorithm is likely to be complex.
143 -- The support surface of the face under construction is computed by a
144 -- deformation of Surf which satisfies the given constraints.
145 -- The set of bounding edges defines the wire of the face.
146 -- If no initial surface is given, the algorithm computes it
147 -- automatically. If the set of edges is not connected (Free constraint),
148 -- missing edges are automatically computed.
149
150
151 Add( me : in out; Constr : Edge from TopoDS;
152 Order : Shape from GeomAbs;
153 IsBound : Boolean from Standard = Standard_True )
154 returns Integer from Standard
155 ---Purpose: Adds a new constraint which also defines an edge of the wire
156 -- of the face
157 -- Order: Order of the constraint:
158 -- GeomAbs_C0 : the surface has to pass by 3D representation
159 -- of the edge
160 -- GeomAbs_G1 : the surface has to pass by 3D representation
161 -- of the edge and to respect tangency with the first
162 -- face of the edge
163 -- GeomAbs_G2 : the surface has to pass by 3D representation
164 -- of the edge and to respect tangency and curvature
165 -- with the first face of the edge.
166 -- Raises ConstructionError if the edge has no representation on a face and Order is
167 -- GeomAbs_G1 or GeomAbs_G2.
168 raises ConstructionError from Standard;
169
170
171 Add( me : in out; Constr : Edge from TopoDS;
172 Support : Face from TopoDS;
173 Order : Shape from GeomAbs;
174 IsBound : Boolean from Standard = Standard_True )
175 returns Integer from Standard
176 ---Purpose: Adds a new constraint which also defines an edge of the wire
177 -- of the face
178 -- Order: Order of the constraint:
179 -- GeomAbs_C0 : the surface has to pass by 3D representation
180 -- of the edge
181 -- GeomAbs_G1 : the surface has to pass by 3D representation
182 -- of the edge and to respect tangency with the
183 -- given face
184 -- GeomAbs_G2 : the surface has to pass by 3D representation
185 -- of the edge and to respect tangency and curvature
186 -- with the given face.
187 -- Raises ConstructionError if the edge has no 2d representation on the given face
188 raises ConstructionError from Standard;
189
190 Add( me : in out; Support : Face from TopoDS;
191 Order : Shape from GeomAbs )
192 returns Integer from Standard;
193 ---Purpose: Adds a free constraint on a face. The corresponding edge has to
194 -- be automatically recomputed. It is always a bound.
195
196 Add( me : in out; Point : Pnt from gp )
197 returns Integer from Standard;
198 ---Purpose: Adds a punctual constraint.
199
200 Add( me : in out; U, V : Real from Standard;
201 Support : Face from TopoDS;
202 Order : Shape from GeomAbs )
203 returns Integer from Standard;
204 ---Purpose: Adds a punctual constraint.
205
206
207 Build( me : in out )
208 ---Purpose: Builds the resulting faces
209 is redefined;
210
211 IsDone(me) returns Boolean from Standard
212 is redefined;
213 --- Purpose: Tests whether computation of the filling plate has been completed.
214
01697018
J
215 Generated (me: in out; S : Shape from TopoDS)
216 ---Purpose: Returns the list of shapes generated from the
217 -- shape <S>.
218 ---C++: return const &
219 ---Level: Public
220 returns ListOfShape from TopTools
221 is redefined;
222
7fd59977 223 G0Error(me) returns Real from Standard;
224 --- Purpose: Returns the maximum distance between the result and
225 -- the constraints. This is set at construction time.
226
227 G1Error(me) returns Real from Standard;
228 ---Purpose: Returns the maximum angle between the result and the
229 -- constraints. This is set at construction time.
230
231 G2Error(me) returns Real from Standard;
232 ---Purpose: Returns the maximum angle between the result and the
233 -- constraints. This is set at construction time.
234
235 G0Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
236 ---Purpose: Returns the maximum distance attained between the
237 -- result and the constraint Index. This is set at construction time.
238
239 G1Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
240 ---Purpose: Returns the maximum angle between the result and the
241 -- constraints. This is set at construction time.
242
243 G2Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
244 ---Purpose: Returns the greatest difference in curvature found
245 -- between the result and the constraint Index.
246
247fields
248
249 myFilling : Filling from BRepFill;
250
251end MakeFilling;