0024784: Move documentation in CDL files to proper location
[occt.git] / src / IntPolyh / IntPolyh_MaillageAffinage.cdl
1 -- Created on: 1999-03-03
2 -- Created by: Fabrice SERVANT
3 -- Copyright (c) 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 under
9 -- the terms of the GNU Lesser General Public License 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 -- Modified by skv - Thu Sep 25 16:51:09 2003 OCC567
18 -- The method GetArrayOfCouples() is added. The Boolean flag isShiftFwd is 
19 -- added to the method FillArrayOfPnt(..).
20 -- The method GetArrayOfCouples() returns array of couples of contact triangles. 
21 -- The flag isShiftFwd shows whether circumscribed (Standard_True) or inscribed 
22 -- (Standard_False) mesh should be constructed.
23 -- modified by ofv Thu Apr  8 14:45:35 2004 fip
24
25 class MaillageAffinage from IntPolyh
26     ---Purpose: Provide the algorythms used in the package
27
28 uses
29     Box                 from Bnd,
30     Pnt                 from gp,
31     HSurface            from Adaptor3d,
32     TopolTool           from Adaptor3d, 
33     Point               from IntPolyh,
34     StartPoint          from IntPolyh,
35     Edge                from IntPolyh,
36     Triangle            from IntPolyh,
37     ArrayOfCouples      from IntPolyh,
38     ArrayOfPoints       from IntPolyh,
39     ArrayOfStartPoints  from IntPolyh,
40     ArrayOfEdges        from IntPolyh,
41     ArrayOfTriangles    from IntPolyh,
42     SectionLine         from IntPolyh,
43     ArrayOfSectionLines from IntPolyh,
44     ArrayOfTangentZones from IntPolyh, 
45     Array1OfReal        from TColStd
46         
47 is 
48
49     Create(S1 : HSurface from Adaptor3d;
50            NbSU1,NbSV1 : Integer from Standard;
51            S2 : HSurface from Adaptor3d;
52            NbSU2,NbSV2 : Integer from Standard;
53            PRINT : Integer from Standard);
54         
55     Create(S1,S2: HSurface from Adaptor3d;
56            PRINT : Integer from Standard);
57     
58     FillArrayOfPnt(me: in out; SurfID: Integer from Standard)
59         is static;
60         ---Purpose: Compute points on one surface and fill an array of points;
61         ---         standard (default) method
62
63     FillArrayOfPnt(me: in out; SurfID    : Integer from Standard; 
64                                isShiftFwd: Boolean from Standard) 
65         ---Purpose: isShiftFwd flag is added. The purpose is to define shift 
66         --          of points along normal to the surface in this point. The 
67         --          shift length represents maximal deflection of triangulation. 
68         --          The direction (forward or reversed regarding to normal 
69         --          direction) is defined by isShiftFwd flag.
70     is static;
71         ---Purpose: Compute points on one surface and fill an array of points;
72         ---         advanced method 
73          
74     --  IFV  start      
75     FillArrayOfPnt(me: in out; SurfID: Integer from Standard;  
76                                Upars, Vpars :  Array1OfReal  from  TColStd)
77         is static;
78         ---Purpose: Compute points on one surface and fill an array of points;
79         ---         standard (default) method
80
81     FillArrayOfPnt(me: in out; SurfID    : Integer from Standard; 
82                                isShiftFwd: Boolean from Standard; 
83                                Upars, Vpars :  Array1OfReal  from  TColStd) 
84         ---Purpose: isShiftFwd flag is added. The purpose is to define shift 
85         --          of points along normal to the surface in this point. The 
86         --          shift length represents maximal deflection of triangulation. 
87         --          The direction (forward or reversed regarding to normal 
88         --          direction) is defined by isShiftFwd flag.
89     is static;
90         ---Purpose: Compute points on one surface and fill an array of points;
91         ---         advanced method
92  
93     --  IFV  end     
94     CommonBox(me:in out; B1,B2: Box from Bnd; xMin,yMin,zMin,xMax,yMax,zMax: in out Real from Standard)
95     is static;
96         ---Purpose:  Compute the common box  witch is the intersection
97         --          of the two bounding boxes,  and mark the points of
98         --          the two surfaces that are inside.
99     
100     FillArrayOfEdges(me: in out; SurfID: Integer from Standard)
101     is static;
102         ---Purpose: Compute edges from the array of points
103
104     FillArrayOfTriangles(me: in out; SurfID: Integer from Standard)
105     is static;
106         ---Purpose: Compute triangles from the array of points, and --
107         --           mark the triangles  that use marked points by the
108         --           CommonBox function.
109     
110     LinkEdges2Triangles(me:in out)
111     is static;
112         ---Purpose: fill the  edge fields in  Triangle object  for the
113         --          two array of triangles.
114     
115     CommonPartRefinement(me: in out)
116     is static;
117         ---Purpose: Refine systematicaly all marked triangles of both surfaces
118
119     LocalSurfaceRefinement(me: in out; SurfId: Integer from Standard)
120     is static;
121         ---Purpose: Refine systematicaly all marked triangles of ONE surface
122
123     ComputeDeflections(me: in out; SurfID: Integer from Standard) 
124     is static;
125         ---Purpose:  Compute deflection  for   all  triangles  of  one
126         --          surface,and sort min and max of deflections
127
128
129     TrianglesDeflectionsRefinementBSB(me:in out)
130         is static;
131         ---Purpose:  Refine  both  surfaces using  BoundSortBox  as --
132         --           rejection.  The  criterions  used to refine a  --
133         --           triangle are:  The deflection The  size of the --
134         --           bounding boxes   (one surface may be   very small
135         --           compared to the other)
136
137     TriContact(me; P1,P2,P3,Q1,Q2,Q3: Point from IntPolyh;
138               Angle:in out Real from Standard)
139     returns Integer from Standard
140     is static; 
141         ---Purpose: This fonction     Check if two triangles   are  in
142         --          contact or no,  return 1 if yes, return 0
143         --          if no.
144     
145     TriangleEdgeContact(me; TriSurfID, EdgeIndice:  Integer from Standard; 
146                         P1,P2,P3,C1,C2,C3,Pe1,Pe2,E,N: Point from IntPolyh;
147                         SP1,SP2: in out StartPoint from IntPolyh)
148     returns Integer from Standard
149     is static;
150
151     TriangleEdgeContact2(me; TriSurfID, EdgeIndice:  Integer from Standard;
152                         Tri1, Tri2: Triangle from IntPolyh;
153                         P1,P2,P3,C1,C2,C3,Pe1,Pe2,E,N: Point from IntPolyh;
154                         SP1,SP2: in out StartPoint from IntPolyh)
155     returns Integer from Standard
156     is static;
157
158     StartingPointsResearch(me; T1,T2: Integer from Standard;
159                            SP1,SP2: in out StartPoint from IntPolyh)
160     returns Integer from Standard
161     is static;
162         
163     StartingPointsResearch2(me; T1,T2: Integer from Standard;
164                            SP1,SP2: in out StartPoint from IntPolyh)
165     returns Integer from Standard
166     is static;
167         ---Purpose: From  two  triangles compute intersection  points.
168         --            If I found   more  than two intersection  points
169         --          that's mean that those triangle are coplanar
170         
171     NextStartingPointsResearch(me; T1,T2: Integer from Standard;
172                                SPInit: StartPoint from IntPolyh;
173                                SPNext: in out StartPoint from IntPolyh)
174     returns Integer from Standard
175     is static;
176
177     NextStartingPointsResearch2(me; T1,T2: Integer from Standard;
178                                 SPInit: StartPoint from IntPolyh;
179                                 SPNext: in out StartPoint from IntPolyh)
180     returns Integer from Standard
181     is static;
182         ---Purpose: from  two triangles  and an intersection   point I
183         --          seach the other point (if it exist).
184         --          This function is used by StartPointChain
185
186     TriangleCompare(me :in out)
187     returns Integer from Standard
188     is static;
189         ---Purpose: Analyse  each couple of  triangles from the two --
190         --             array  of triangles,  to   see  if they are  in
191         --           contact,  and  compute the  incidence.  Then  put
192         --            couples  in contact  in  the  array  of  couples
193
194     TriangleComparePSP(me :in out)
195     returns Integer from Standard
196     is static;
197         ---Purpose:  The   same as   TriangleCompare, plus compute the
198         --          StartPoints without chaining them.
199
200     StartPointsCalcul(me)
201     is static;
202         ---Purpose:  From the array  of couples compute  all the start
203         --          points and display them on the screen
204
205     StartPointsChain(me: in out; 
206                      TSectionLines: in out ArrayOfSectionLines from IntPolyh;
207                      TTangentZones: in out ArrayOfTangentZones from IntPolyh)
208     returns Integer from Standard
209     is static;
210         ---Purpose: Loop on the array of couples. Compute StartPoints.
211         --          Try to chain  the StartPoints into SectionLines or
212         --          put  the  point  in  the    ArrayOfTangentZones if
213         --          chaining it, is not possible.
214
215     GetNextChainStartPoint(me: in out; 
216                            SPInit: StartPoint from IntPolyh; 
217                            SPNext: in out StartPoint from IntPolyh;
218                            MySectionLine: in out SectionLine from IntPolyh;
219                            TTangentZones: in out ArrayOfTangentZones from IntPolyh;
220                            Prepend : Boolean from Standard = Standard_False)
221     returns Integer from Standard
222     is static;
223         ---Purpose:  Mainly  used  by StartPointsChain(), this function
224         --           try to compute the next StartPoint.
225
226     GetArrayOfPoints(me; SurfID: Integer from Standard)
227         ---C++: return const &
228     returns ArrayOfPoints from IntPolyh
229     is static;
230
231     GetArrayOfEdges(me; SurfID: Integer from Standard)
232         ---C++: return const &
233     returns ArrayOfEdges from IntPolyh
234     is static;
235
236     GetArrayOfTriangles(me; SurfID: Integer from Standard)
237         ---C++: return const &
238     returns ArrayOfTriangles from IntPolyh
239     is static;
240     
241     GetFinTE(me; SurfID: Integer from Standard)
242     returns Integer from Standard
243     is static;
244     
245     GetFinTT(me; SurfID: Integer from Standard)
246     returns Integer from Standard
247     is static;
248     
249     GetBox(me; SurfID: Integer from Standard)
250     returns Box from Bnd
251     is static;
252     
253     GetBoxDraw(me; SurfID: Integer from Standard)
254     is static;    
255
256
257     GetArrayOfSP(me)
258         ---C++: return const &
259     returns ArrayOfStartPoints from IntPolyh
260     is static;
261     
262     GetArrayOfCouples(me:  in  out)
263         ---Purpose: This method returns array of couples of contact triangles.
264         ---C++: return & 
265     returns ArrayOfCouples from IntPolyh
266     is static;
267
268     SetEnlargeZone(me: in out; EnlargeZone: in out Boolean from Standard);
269     GetEnlargeZone(me) returns Boolean from Standard;
270
271
272 fields
273
274     
275     MaSurface1     : HSurface from Adaptor3d;
276     MaSurface2     : HSurface from Adaptor3d;
277     
278     MyBox1         : Box from Bnd;
279     MyBox2         : Box from Bnd;
280     
281     NbSamplesU1    : Integer from Standard;
282     NbSamplesU2    : Integer from Standard;
283     NbSamplesV1    : Integer from Standard;
284     NbSamplesV2    : Integer from Standard;
285     
286     FlecheMax1     : Real    from Standard;
287     FlecheMax2     : Real    from Standard;
288     FlecheMin1     : Real    from Standard;
289     FlecheMin2     : Real    from Standard;
290     FlecheMoy1     : Real    from Standard;
291     FlecheMoy2     : Real    from Standard;
292
293     TPoints1           : ArrayOfPoints      from IntPolyh;
294     TPoints2           : ArrayOfPoints      from IntPolyh;
295     TEdges1            : ArrayOfEdges       from IntPolyh;
296     TEdges2            : ArrayOfEdges       from IntPolyh;
297     TTriangles1        : ArrayOfTriangles   from IntPolyh;
298     TTriangles2        : ArrayOfTriangles   from IntPolyh;
299     TTrianglesContacts : ArrayOfCouples     from IntPolyh;
300     TStartPoints       : ArrayOfStartPoints from IntPolyh;
301     
302     myEnlargeZone    : Boolean from Standard;
303
304 end Test from IntPolyh;
305