Integration of OCCT 6.5.0 from SVN
[occt.git] / src / BRepFill / BRepFill_Filling.cdl
CommitLineData
7fd59977 1-- File: BRepFill_Filling.cdl
2-- Created: Wed Aug 26 11:47:28 1998
3-- Author: Julia GERASIMOVA
4-- <jgv@clubox.nnov.matra-dtv.fr>
5---Copyright: Matra Datavision 1998
6
7
8class Filling from BRepFill
9
10 ---Purpose: N-Side Filling
11 -- This algorithm avoids to build a face from:
12 -- * a set of edges defining the bounds of the face and some
13 -- constraints the surface support has to satisfy
14 -- * a set of edges and points defining some constraints
15 -- the support surface has to satisfy
16 -- * an initial surface to deform for satisfying the constraints
17 -- * a set of parameters to control the constraints.
18 --
19 -- The support surface of the face is computed by deformation
20 -- of the initial surface in order to satisfy the given constraints.
21 -- The set of bounding edges defines the wire of the face.
22 --
23 -- If no initial surface is given, the algorithm computes it
24 -- automatically.
25 -- If the set of edges is not connected (Free constraint)
26 -- missing edges are automatically computed.
27 --
28 -- Limitations:
29 -- * If some constraints are not compatible
30 -- The algorithm does not take them into account.
31 -- So the constraints will not be satisfyed in an area containing
32 -- the incompatibilitries.
33 -- * The constraints defining the bound of the face have to be
34 -- entered in order to have a continuous wire.
35 --
36 -- Other Applications:
37 -- * Deformation of a face to satisfy internal constraints
38 -- * Deformation of a face to improve Gi continuity with
39 -- connected faces
40
41 ---Level: Advanced
42
43uses
44 Shape from TopoDS,
45 Edge from TopoDS,
46 Face from TopoDS,
47 Pnt from gp,
48 Shape from GeomAbs,
49 BuildPlateSurface from GeomPlate,
50 SequenceOfEdgeFaceAndOrder from BRepFill,
51 SequenceOfFaceAndOrder from BRepFill,
52 SequenceOfPointConstraint from GeomPlate,
53 MapOfShape from TopTools,
54 SequenceOfPnt from TColgp
55
56raises
57 NotDone,
58 OutOfRange,
59 ConstructionError
60
61is
62 Create( Degree : Integer from Standard = 3;
63 NbPtsOnCur : Integer from Standard = 15;
64 NbIter : Integer from Standard = 2;
65 Anisotropie : Boolean from Standard = Standard_False;
66 Tol2d : Real from Standard = 0.00001;
67 Tol3d : Real from Standard = 0.0001;
68 TolAng : Real from Standard = 0.01;
69 TolCurv : Real from Standard = 0.1;
70 MaxDeg : Integer from Standard = 8;
71 MaxSegments : Integer from Standard = 9 )
72 ---Purpose: Constructor
73 --
74 returns Filling from BRepFill;
75
76
77 SetConstrParam( me : in out; Tol2d : Real from Standard = 0.00001;
78 Tol3d : Real from Standard = 0.0001;
79 TolAng : Real from Standard = 0.01;
80 TolCurv : Real from Standard = 0.1 );
81 ---Purpose: Sets the values of Tolerances used to control the constraint.
82 -- Tol2d:
83 -- Tol3d: it is the maximum distance allowed between the support surface
84 -- and the constraints
85 -- TolAng: it is the maximum angle allowed between the normal of the surface
86 -- and the constraints
87 -- TolCurv: it is the maximum difference of curvature allowed between
88 -- the surface and the constraint
89
90 SetResolParam( me : in out; Degree : Integer from Standard = 3;
91 NbPtsOnCur : Integer from Standard = 15;
92 NbIter : Integer from Standard = 2;
93 Anisotropie : Boolean from Standard = Standard_False );
94 ---Purpose: Sets the parameters used for resolution.
95 -- The default values of these parameters have been chosen for a good
96 -- ratio quality/performance.
97 -- Degree: it is the order of energy criterion to minimize for computing
98 -- the deformation of the surface.
99 -- The default value is 3
100 -- The recommanded value is i+2 where i is the maximum order of the
101 -- constraints.
102 -- NbPtsOnCur: it is the average number of points for discretisation
103 -- of the edges.
104 -- NbIter: it is the maximum number of iterations of the process.
105 -- For each iteration the number of discretisation points is
106 -- increased.
107 -- Anisotropie:
108
109 SetApproxParam( me : in out; MaxDeg : Integer from Standard = 8;
110 MaxSegments : Integer from Standard = 9 );
111 ---Purpose: Sets the parameters used for approximation of the surface
112 --
113
114
115 LoadInitSurface( me : in out; aFace : Face from TopoDS );
116 ---Purpose: Loads the initial Surface
117
118
119 Add( me : in out; anEdge : Edge from TopoDS;
120 Order : Shape from GeomAbs;
121 IsBound : Boolean from Standard = Standard_True )
122 returns Integer from Standard
123 ---Purpose: Adds a new constraint which also defines an edge of the wire
124 -- of the face
125 -- Order: Order of the constraint:
126 -- GeomAbs_C0 : the surface has to pass by 3D representation
127 -- of the edge
128 -- GeomAbs_G1 : the surface has to pass by 3D representation
129 -- of the edge and to respect tangency with the first
130 -- face of the edge
131 -- GeomAbs_G2 : the surface has to pass by 3D representation
132 -- of the edge and to respect tangency and curvature
133 -- with the first face of the edge.
134 raises ConstructionError from Standard;
135 -- if the edge has no representation on a face and Order is
136 -- GeomAbs_G1 or GeomAbs_G2.
137
138 Add( me : in out; anEdge : Edge from TopoDS;
139 Support : Face from TopoDS;
140 Order : Shape from GeomAbs;
141 IsBound : Boolean from Standard = Standard_True )
142 returns Integer from Standard
143 ---Purpose: Adds a new constraint which also defines an edge of the wire
144 -- of the face
145 -- Order: Order of the constraint:
146 -- GeomAbs_C0 : the surface has to pass by 3D representation
147 -- of the edge
148 -- GeomAbs_G1 : the surface has to pass by 3D representation
149 -- of the edge and to respect tangency with the
150 -- given face
151 -- GeomAbs_G2 : the surface has to pass by 3D representation
152 -- of the edge and to respect tangency and curvature
153 -- with the given face.
154 raises ConstructionError from Standard;
155 -- if the edge has no 2d representation on the given face
156
157 Add( me : in out; Support : Face from TopoDS;
158 Order : Shape from GeomAbs )
159 returns Integer from Standard;
160 ---Purpose: Adds a free constraint on a face. The corresponding edge has to
161 -- be automatically recomputed.
162 -- It is always a bound.
163
164 Add( me : in out; Point : Pnt from gp )
165 returns Integer from Standard;
166 ---Purpose: Adds a punctual constraint
167
168 Add( me : in out; U, V : Real from Standard;
169 Support : Face from TopoDS;
170 Order : Shape from GeomAbs )
171 returns Integer from Standard;
172 ---Purpose: Adds a punctual constraint.
173
174
175 AddConstraints( me : in out; SeqOfConstraints : SequenceOfEdgeFaceAndOrder from BRepFill )
176 ---Purpose: Adds constraints to builder
177 is private;
178
179 BuildWires( me; EdgeMap : in out MapOfShape from TopTools;
180 WireList : out MapOfShape from TopTools )
181 ---Purpose: Builds wires of maximum length
182 is private;
183
184 FindExtremitiesOfHoles( me; WireMap : in out MapOfShape from TopTools;
185 PntSeq : out SequenceOfPnt from TColgp )
186 ---Purpose: Finds extremities of future edges to fix the holes between wires.
187 -- Can properly operate only with convex contour
188 is private;
189
190 Build( me : in out );
191 ---Purpose: Builds the resulting faces
192
193 IsDone(me) returns Boolean from Standard;
194
195 Face(me) returns Face from TopoDS;
196 -- returns the resulting face
197
198
199 G0Error(me) returns Real from Standard;
200 -- returns the max distance between the result and the constraints
201
202 G1Error(me) returns Real from Standard;
203 -- returns the max angle between the result and the constraints
204
205 G2Error(me) returns Real from Standard;
206 -- returns the max difference of curvature between the result and the constraints
207
208
209 G0Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
210 -- returns the max distance between the result and the constraint Index
211
212 G1Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
213 -- returns the max angle between the result and the constraint Index
214
215 G2Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
216 -- returns the max difference of curvature between the result and the constraint Index
217
218fields
219
220 myBuilder : BuildPlateSurface from GeomPlate;
221 myBoundary : SequenceOfEdgeFaceAndOrder from BRepFill;
222 myConstraints : SequenceOfEdgeFaceAndOrder from BRepFill;
223 myFreeConstraints : SequenceOfFaceAndOrder from BRepFill;
224 myPoints : SequenceOfPointConstraint from GeomPlate;
225
226 myFace : Face from TopoDS;
227
228 myInitFace : Face from TopoDS;
229
230 -- Tolerances
231 myTol2d : Real from Standard;
232 myTol3d : Real from Standard;
233 myTolAng : Real from Standard;
234 myTolCurv : Real from Standard;
235
236 -- Parameters of approximation
237 myMaxDeg : Integer from Standard;
238 myMaxSegments : Integer from Standard;
239
240 -- Parameters of resolution
241 myDegree : Integer from Standard;
242 myNbPtsOnCur : Integer from Standard;
243 myNbIter : Integer from Standard;
244 myAnisotropie : Boolean from Standard;
245
246 myIsInitFaceGiven : Boolean from Standard;
247
248 myIsDone : Boolean from Standard;
249
250end Filling;