70e51915be4b749edfe12823f07f0b2298ac0187
[occt.git] / src / HLRAlgo / HLRAlgo_PolyAlgo.cxx
1 // Created on: 1995-05-05
2 // Created by: Christophe MARION
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22 #ifndef No_Exception
23 //#define No_Exception
24 #endif
25 #include <HLRAlgo_PolyAlgo.ixx>
26 #include <HLRAlgo_PolyShellData.hxx>
27 #include <HLRAlgo_PolyData.hxx>
28 #include <HLRAlgo_ListOfBPoint.hxx>
29 #include <HLRAlgo_BiPoint.hxx>
30 #include <Precision.hxx>
31
32 #define EMskGrALin1  ((Standard_Boolean)   8)
33 #define EMskGrALin2  ((Standard_Boolean)  16)
34 #define EMskGrALin3  ((Standard_Boolean)  32)
35 #define FMskHiding   ((Standard_Boolean) 256)
36
37 #define TriNode1 ((Standard_Integer*)TriIndices)[0]
38 #define TriNode2 ((Standard_Integer*)TriIndices)[1]
39 #define TriNode3 ((Standard_Integer*)TriIndices)[2]
40 #define TriFlags ((Standard_Boolean*)TriIndices)[3]
41
42 #define XV1          myRealPtr[0]
43 #define XV2          myRealPtr[1]
44 #define XV3          myRealPtr[2]
45 #define YV1          myRealPtr[3]
46 #define YV2          myRealPtr[4]
47 #define YV3          myRealPtr[5]
48 #define Param        myRealPtr[6]
49 #define myTolParam   myRealPtr[7]
50 #define myTolAngular myRealPtr[8]
51 #define myTolerance  myRealPtr[9]
52
53 #define PntX1  ((Standard_Real*)Coordinates)[ 0]
54 #define PntY1  ((Standard_Real*)Coordinates)[ 1]
55 #define PntZ1  ((Standard_Real*)Coordinates)[ 2]
56 #define PntX2  ((Standard_Real*)Coordinates)[ 3]
57 #define PntY2  ((Standard_Real*)Coordinates)[ 4]
58 #define PntZ2  ((Standard_Real*)Coordinates)[ 5]
59 #define PntXP1 ((Standard_Real*)Coordinates)[ 6]
60 #define PntYP1 ((Standard_Real*)Coordinates)[ 7]
61 #define PntZP1 ((Standard_Real*)Coordinates)[ 8]
62 #define PntXP2 ((Standard_Real*)Coordinates)[ 9]
63 #define PntYP2 ((Standard_Real*)Coordinates)[10]
64 #define PntZP2 ((Standard_Real*)Coordinates)[11]
65
66 #define TotXMin    ((Standard_Real*)TotMinMax)[0]
67 #define TotYMin    ((Standard_Real*)TotMinMax)[1]
68 #define TotZMin    ((Standard_Real*)TotMinMax)[2]
69 #define TotXMax    ((Standard_Real*)TotMinMax)[3]
70 #define TotYMax    ((Standard_Real*)TotMinMax)[4]
71 #define TotZMax    ((Standard_Real*)TotMinMax)[5]
72
73 #define ShapeIndex ((Standard_Integer*)IndexPtr)[0]
74 #define FaceConex1 ((Standard_Integer*)IndexPtr)[1]
75 #define Face1Pt1   ((Standard_Integer*)IndexPtr)[2]
76 #define Face1Pt2   ((Standard_Integer*)IndexPtr)[3]
77 #define FaceConex2 ((Standard_Integer*)IndexPtr)[4]
78 #define Face2Pt1   ((Standard_Integer*)IndexPtr)[5]
79 #define Face2Pt2   ((Standard_Integer*)IndexPtr)[6]
80 #define MinSeg     ((Standard_Integer*)IndexPtr)[7]
81 #define MaxSeg     ((Standard_Integer*)IndexPtr)[8]
82 #define SegFlags   ((Standard_Integer*)IndexPtr)[9]
83
84 #define MinShell ((Standard_Integer*)ShellIndices)[0]
85 #define MaxShell ((Standard_Integer*)ShellIndices)[1]
86
87 #define FIndex   ((Standard_Integer*)PolyTIndices)[0]
88 #define MinPolyT ((Standard_Integer*)PolyTIndices)[1]
89 #define MaxPolyT ((Standard_Integer*)PolyTIndices)[2]
90
91 //static Standard_Integer ERROR = Standard_False;
92
93 //=======================================================================
94 //function : HLRAlgo_PolyAlgo
95 //purpose  : 
96 //=======================================================================
97
98 HLRAlgo_PolyAlgo::HLRAlgo_PolyAlgo ()
99 {
100   myTolParam   = 0.00000001;
101   myTolAngular = 0.0001;
102 }
103
104 //=======================================================================
105 //function : Init
106 //purpose  : 
107 //=======================================================================
108
109 void
110 HLRAlgo_PolyAlgo::Init (const Handle(TColStd_HArray1OfTransient)& HShell)
111 { myHShell = HShell; }
112
113 //=======================================================================
114 //function : Clear
115 //purpose  : 
116 //=======================================================================
117
118 void HLRAlgo_PolyAlgo::Clear ()
119 {
120   if (!myHShell.IsNull()) {
121     myHShell.Nullify();
122   }
123   myNbrShell = 0;
124 }
125
126 //=======================================================================
127 //function : Update
128 //purpose  : 
129 //=======================================================================
130
131 void HLRAlgo_PolyAlgo::Update ()
132 {
133   Standard_Integer i,j;
134   Standard_Integer nxMin,nyMin,nzMin,nxMax,nyMax,nzMax;
135   Standard_Real xShellMin,yShellMin,zShellMin;
136   Standard_Real xShellMax,yShellMax,zShellMax;
137   Standard_Real xPolyTMin,yPolyTMin,zPolyTMin;
138   Standard_Real xPolyTMax,yPolyTMax,zPolyTMax;
139   Standard_Real xTrianMin,yTrianMin,zTrianMin;
140   Standard_Real xTrianMax,yTrianMax,zTrianMax;
141   Standard_Real xSegmnMin,ySegmnMin,zSegmnMin;
142   Standard_Real xSegmnMax,ySegmnMax,zSegmnMax;
143   Standard_Real TotMinMax[6];
144   Standard_Real Big = Precision::Infinite();
145   TotMinMax[0] =  Big;
146   TotMinMax[1] =  Big;
147   TotMinMax[2] =  Big;
148   TotMinMax[3] = -Big;
149   TotMinMax[4] = -Big;
150   TotMinMax[5] = -Big;
151   TColStd_Array1OfTransient& Shell = myHShell->ChangeArray1();
152   myNbrShell = Shell.Upper();
153   Handle(HLRAlgo_PolyShellData)* psd1 = 
154     (Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
155
156   for (i = 1; i <= myNbrShell; i++) {
157     (*psd1)->UpdateGlobalMinMax(&TotMinMax);
158     psd1++;
159   }
160
161   Standard_Real dx = TotMinMax[3] - TotMinMax[0];
162   Standard_Real dy = TotMinMax[4] - TotMinMax[1];
163   Standard_Real dz = TotMinMax[5] - TotMinMax[2];
164   Standard_Real    precad = dx;
165   if (precad < dy) precad = dy;
166   if (precad < dz) precad = dz;
167   myTolerance = precad * myTolParam;
168   precad = precad * 0.01;
169   Standard_Real SurDX = 1020 / (dx + precad);
170   Standard_Real SurDY = 1020 / (dy + precad);
171   Standard_Real SurDZ =  508 / (dz + precad);
172   precad = precad * 0.5;
173   Standard_Real DecaX = - TotMinMax[0] + precad;
174   Standard_Real DecaY = - TotMinMax[1] + precad;
175   Standard_Real DecaZ = - TotMinMax[2] + precad;
176
177   Handle(HLRAlgo_PolyShellData)* psd2 = 
178     (Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
179
180   for (i = 1; i <= myNbrShell; i++) {
181     const Standard_Address ShellIndices = (*psd2)->Indices();
182     xShellMin =  Big;
183     yShellMin =  Big;
184     zShellMin =  Big;
185     xShellMax = -Big;
186     yShellMax = -Big;
187     zShellMax = -Big;
188
189     for (mySegListIt.Initialize((*psd2)->Edges());
190          mySegListIt.More();
191          mySegListIt.Next()) {      
192       HLRAlgo_BiPoint& BP = mySegListIt.Value();
193       const Standard_Address Coordinates = BP.Coordinates();
194       const Standard_Address IndexPtr    = BP.Indices();
195       if (PntXP1 < PntXP2) { xSegmnMin = PntXP1; xSegmnMax = PntXP2; }
196       else                 { xSegmnMin = PntXP2; xSegmnMax = PntXP1; }
197       if (PntYP1 < PntYP2) { ySegmnMin = PntYP1; ySegmnMax = PntYP2; }
198       else                 { ySegmnMin = PntYP2; ySegmnMax = PntYP1; }
199       if (PntZP1 < PntZP2) { zSegmnMin = PntZP1; zSegmnMax = PntZP2; }
200       else                 { zSegmnMin = PntZP2; zSegmnMax = PntZP1; }
201       nxMin = (Standard_Integer)((DecaX + xSegmnMin) * SurDX);
202       nyMin = (Standard_Integer)((DecaY + ySegmnMin) * SurDY);
203       nzMin = (Standard_Integer)((DecaZ + zSegmnMin) * SurDZ);
204       nxMax = (Standard_Integer)((DecaX + xSegmnMax) * SurDX);
205       nyMax = (Standard_Integer)((DecaY + ySegmnMax) * SurDY);
206       nzMax = (Standard_Integer)((DecaZ + zSegmnMax) * SurDZ);
207       MinSeg = nyMin + (nxMin << 11);
208       MinSeg <<= 10;
209       MinSeg += nzMin;
210       MaxSeg = nyMax + (nxMax << 11);
211       MaxSeg <<= 10;
212       MaxSeg += nzMax + 0x00000200;
213       if (xShellMin > xSegmnMin) xShellMin = xSegmnMin;
214       if (xShellMax < xSegmnMax) xShellMax = xSegmnMax;
215       if (yShellMin > ySegmnMin) yShellMin = ySegmnMin;
216       if (yShellMax < ySegmnMax) yShellMax = ySegmnMax;
217       if (zShellMin > zSegmnMin) zShellMin = zSegmnMin;
218       if (zShellMax < zSegmnMax) zShellMax = zSegmnMax;
219     }
220     TColStd_Array1OfTransient& Polyg = (*psd2)->PolyData();
221     Standard_Integer nbFace = Polyg.Upper();
222     Standard_Integer nbFaHi = 0;
223     Handle(HLRAlgo_PolyData)* pd;
224     if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1));
225     
226     for (j = 1; j <= nbFace; j++) {
227       if ((*pd)->Hiding()) {
228         nbFaHi++;
229         xPolyTMin =  Big;
230         yPolyTMin =  Big;
231         zPolyTMin =  Big;
232         xPolyTMax = -Big;
233         yPolyTMax = -Big;
234         zPolyTMax = -Big;
235         Standard_Integer otheri,nbHide = 0;//min,max;
236         Standard_Real X1,X2,X3,Y1,Y2,Y3,Z1,Z2,Z3;
237         Standard_Real dn,dnx,dny,dnz,dx1,dy1,dz1,dx2,dy2,dz2,dx3,dy3;
238         Standard_Real adx1,ady1,adx2,ady2,adx3,ady3;
239         Standard_Real a =0.,b =0.,c =0.,d =0.;
240         const Standard_Address PolyTIndices = (*pd)->Indices();
241         TColgp_Array1OfXYZ   & Nodes        = (*pd)->Nodes();
242         HLRAlgo_Array1OfTData& TData        = (*pd)->TData();
243         HLRAlgo_Array1OfPHDat& PHDat        = (*pd)->PHDat();
244         Standard_Integer nbT = TData.Upper();
245         HLRAlgo_TriangleData* TD = &(TData.ChangeValue(1));
246         
247         for (otheri = 1; otheri <= nbT; otheri++) {
248           const Standard_Address TriIndices = TD->Indices();
249           if (TriFlags & FMskHiding) {
250             const gp_XYZ& P1 = Nodes(TriNode1);
251             const gp_XYZ& P2 = Nodes(TriNode2);
252             const gp_XYZ& P3 = Nodes(TriNode3);
253             X1 = P1.X();
254             Y1 = P1.Y();
255             Z1 = P1.Z();
256             X2 = P2.X();
257             Y2 = P2.Y();
258             Z2 = P2.Z();
259             X3 = P3.X();
260             Y3 = P3.Y();
261             Z3 = P3.Z();
262             xTrianMax = xTrianMin = X1;
263             yTrianMax = yTrianMin = Y1;
264             zTrianMax = zTrianMin = Z1;
265             if      (xTrianMin > X2) xTrianMin = X2;
266             else if (xTrianMax < X2) xTrianMax = X2;
267             if      (yTrianMin > Y2) yTrianMin = Y2;
268             else if (yTrianMax < Y2) yTrianMax = Y2;
269             if      (zTrianMin > Z2) zTrianMin = Z2;
270             else if (zTrianMax < Z2) zTrianMax = Z2;
271             if      (xTrianMin > X3) xTrianMin = X3;
272             else if (xTrianMax < X3) xTrianMax = X3;
273             if      (yTrianMin > Y3) yTrianMin = Y3;
274             else if (yTrianMax < Y3) yTrianMax = Y3;
275             if      (zTrianMin > Z3) zTrianMin = Z3;
276             else if (zTrianMax < Z3) zTrianMax = Z3;
277             nxMin = (Standard_Integer)((DecaX + xTrianMin) * SurDX);
278             nyMin = (Standard_Integer)((DecaY + yTrianMin) * SurDY);
279             nzMin = (Standard_Integer)((DecaZ + zTrianMin) * SurDZ);
280             nxMax = (Standard_Integer)((DecaX + xTrianMax) * SurDX);
281             nyMax = (Standard_Integer)((DecaY + yTrianMax) * SurDY);
282             nzMax = (Standard_Integer)((DecaZ + zTrianMax) * SurDZ);
283             Standard_Integer MinTrian,MaxTrian;
284             MinTrian   = nyMin + (nxMin << 11);
285             MinTrian <<= 10;
286             MinTrian  += nzMin - 0x00000200;
287             MaxTrian   = nyMax + (nxMax << 11);
288             MaxTrian <<= 10;
289             MaxTrian  += nzMax;
290             dx1 = X2 - X1;
291             dy1 = Y2 - Y1;
292             dz1 = Z2 - Z1;
293             dx2 = X3 - X2;
294             dy2 = Y3 - Y2;
295             dz2 = Z3 - Z2;
296             dx3 = X1 - X3;
297             dy3 = Y1 - Y3;
298             dnx = dy1 * dz2 - dy2 * dz1;
299             dny = dz1 * dx2 - dz2 * dx1;
300             dnz = dx1 * dy2 - dx2 * dy1;
301             dn = sqrt(dnx * dnx + dny * dny + dnz * dnz);
302             if (dn > 0) {
303               a = dnx / dn;
304               b = dny / dn;
305               c = dnz / dn;
306             }
307             d = a * X1 + b * Y1 + c * Z1;
308             nbHide++;
309             PHDat(nbHide).Set(otheri,MinTrian,MaxTrian,a,b,c,d);
310             adx1 = dx1;
311             ady1 = dy1;
312             if (dx1 < 0) adx1 = -dx1;
313             if (dy1 < 0) ady1 = -dy1;
314             adx2 = dx2;
315             ady2 = dy2;
316             if (dx2 < 0) adx2 = -dx2;
317             if (dy2 < 0) ady2 = -dy2;
318             adx3 = dx3;
319             ady3 = dy3;
320             if (dx3 < 0) adx3 = -dx3;
321             if (dy3 < 0) ady3 = -dy3;
322             if (adx1 > ady1) TriFlags |=  EMskGrALin1;
323             else             TriFlags &= ~EMskGrALin1;
324             if (adx2 > ady2) TriFlags |=  EMskGrALin2;
325             else             TriFlags &= ~EMskGrALin2;
326             if (adx3 > ady3) TriFlags |=  EMskGrALin3;
327             else             TriFlags &= ~EMskGrALin3;
328             if (xPolyTMin > xTrianMin) xPolyTMin = xTrianMin;
329             if (xPolyTMax < xTrianMax) xPolyTMax = xTrianMax;
330             if (yPolyTMin > yTrianMin) yPolyTMin = yTrianMin;
331             if (yPolyTMax < yTrianMax) yPolyTMax = yTrianMax;
332             if (zPolyTMin > zTrianMin) zPolyTMin = zTrianMin;
333             if (zPolyTMax < zTrianMax) zPolyTMax = zTrianMax;
334           }
335           TD++;
336         }
337         nxMin = (Standard_Integer)((DecaX + xPolyTMin) * SurDX);
338         nyMin = (Standard_Integer)((DecaY + yPolyTMin) * SurDY);
339         nzMin = (Standard_Integer)((DecaZ + zPolyTMin) * SurDZ);
340         nxMax = (Standard_Integer)((DecaX + xPolyTMax) * SurDX);
341         nyMax = (Standard_Integer)((DecaY + yPolyTMax) * SurDY);
342         nzMax = (Standard_Integer)((DecaZ + zPolyTMax) * SurDZ);
343         MinPolyT   = nyMin + (nxMin << 11);
344         MinPolyT <<= 10;
345         MinPolyT  += nzMin - 0x00000200;
346         MaxPolyT   = nyMax + (nxMax << 11);
347         MaxPolyT <<= 10;
348         MaxPolyT  += nzMax;
349         if (xShellMin > xPolyTMin) xShellMin = xPolyTMin;
350         if (xShellMax < xPolyTMax) xShellMax = xPolyTMax;
351         if (yShellMin > yPolyTMin) yShellMin = yPolyTMin;
352         if (yShellMax < yPolyTMax) yShellMax = yPolyTMax;
353         if (zShellMin > zPolyTMin) zShellMin = zPolyTMin;
354         if (zShellMax < zPolyTMax) zShellMax = zPolyTMax;
355       }
356       pd++;
357     }
358     if (nbFaHi > 0) {
359       nxMin = (Standard_Integer)((DecaX + xShellMin) * SurDX);
360       nyMin = (Standard_Integer)((DecaY + yShellMin) * SurDY);
361       nzMin = (Standard_Integer)((DecaZ + zShellMin) * SurDZ);
362       nxMax = (Standard_Integer)((DecaX + xShellMax) * SurDX);
363       nyMax = (Standard_Integer)((DecaY + yShellMax) * SurDY);
364       nzMax = (Standard_Integer)((DecaZ + zShellMax) * SurDZ);
365       MinShell   = nyMin + (nxMin << 11);
366       MinShell <<= 10;
367       MinShell  += nzMin - 0x00000200;
368       MaxShell   = nyMax + (nxMax << 11);
369       MaxShell <<= 10;
370       MaxShell  += nzMax;
371       (*psd2)->UpdateHiding(nbFaHi);
372       TColStd_Array1OfTransient& PolHi = (*psd2)->HidingPolyData();
373       pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1));
374       Handle(HLRAlgo_PolyData)* phd = 
375         (Handle(HLRAlgo_PolyData)*)&(PolHi.ChangeValue(1));
376       
377       for (j = 1; j <= nbFace; j++) {
378         if ((*pd)->Hiding()) {
379           *phd = *pd;
380           phd++;
381         }
382         pd++;
383       }
384     }
385     else {
386       (*psd2)->UpdateHiding(0);
387       MinShell = 0;
388       MaxShell = 0;
389     }
390     psd2++;
391   }
392 }
393
394 //=======================================================================
395 //function : NextHide
396 //purpose  : 
397 //=======================================================================
398
399 void HLRAlgo_PolyAlgo::NextHide ()
400 {
401   myFound = Standard_False;
402   if (myCurShell != 0) {
403     mySegListIt.Next();
404     if (mySegListIt.More()) myFound = Standard_True;
405   }
406   if (!myFound) {
407     myCurShell++;
408
409 //POP ADN pour que cela marche sur WNT
410 //    while (myCurShell <= myNbrShell && !myFound) {
411 //      mySegListIt.Initialize((*(Handle(HLRAlgo_PolyShellData)*)&
412 //                            (myHShell->ChangeValue(myCurShell)))
413 //                           ->Edges());
414     while (myCurShell <= myNbrShell && !myFound) {
415           Handle(HLRAlgo_PolyShellData) data = 
416                   Handle(HLRAlgo_PolyShellData)::DownCast(myHShell->Value(myCurShell));
417       mySegListIt.Initialize(data->Edges());
418       if (mySegListIt.More()) myFound = Standard_True;
419       else                    myCurShell++;
420     }
421   }
422 }
423
424 //=======================================================================
425 //function : Hide
426 //purpose  : 
427 //=======================================================================
428
429 void HLRAlgo_PolyAlgo::Hide (Standard_Address& Coordinates,
430                              HLRAlgo_EdgeStatus& status,
431                              Standard_Integer& Index,
432                              Standard_Boolean& reg1,
433                              Standard_Boolean& regn,
434                              Standard_Boolean& outl,
435                              Standard_Boolean& intl)
436 {
437   HLRAlgo_BiPoint& BP             = mySegListIt.Value();
438   Coordinates                     = BP.Coordinates();
439   const Standard_Address IndexPtr = BP.Indices();
440   status = HLRAlgo_EdgeStatus(0.,(Standard_ShortReal)myTolParam,1.,(Standard_ShortReal)myTolParam);
441   Index = ShapeIndex;
442   reg1       = BP.Rg1Line();
443   regn       = BP.RgNLine();
444   outl       = BP.OutLine();
445   intl       = BP.IntLine();
446   if (BP.Hidden())
447     status.HideAll();
448   else {
449     Standard_Boolean HidingShell;
450     TColStd_Array1OfTransient& Shell = myHShell->ChangeArray1();
451     Handle(HLRAlgo_PolyShellData)* psd = 
452       (Handle(HLRAlgo_PolyShellData)*)&(Shell.ChangeValue(1));
453     
454     for (Standard_Integer s = 1; s <= myNbrShell; s++) {
455       if ((*psd)->Hiding()) {
456         const Standard_Address ShellIndices = (*psd)->Indices();
457         if (((MaxShell - MinSeg) & 0x80100200) == 0 &&
458             ((MaxSeg - MinShell) & 0x80100000) == 0) {
459           HidingShell = (s == myCurShell);
460           TColStd_Array1OfTransient& Face = (*psd)->HidingPolyData();
461           Standard_Integer nbFace = Face.Upper();
462           Handle(HLRAlgo_PolyData)* pd = 
463             (Handle(HLRAlgo_PolyData)*)&(Face.ChangeValue(1));
464           
465           for (Standard_Integer f = 1; f <= nbFace; f++) {
466             (*pd)->HideByPolyData(Coordinates,
467                                   (Standard_Address)myRealPtr,
468                                   IndexPtr,
469                                   HidingShell,
470                                   status);
471             pd++;
472           }
473         }
474       }
475       psd++;
476     }
477   }
478 }
479
480 //=======================================================================
481 //function : NextShow
482 //purpose  : 
483 //=======================================================================
484
485 void HLRAlgo_PolyAlgo::NextShow ()
486 {
487   myFound = Standard_False;
488   if (myCurShell != 0) {
489     mySegListIt.Next();
490     if (mySegListIt.More()) myFound = Standard_True;
491   }
492   if (!myFound) {
493     myCurShell++;
494
495     while (myCurShell <= myNbrShell && !myFound) {
496       mySegListIt.Initialize((*(Handle(HLRAlgo_PolyShellData)*)&
497                               (myHShell->ChangeValue(myCurShell)))
498                              ->Edges());
499       if (mySegListIt.More()) myFound = Standard_True;
500       else                    myCurShell++;
501     }
502   }
503 }
504
505 //=======================================================================
506 //function : Show
507 //purpose  : 
508 //=======================================================================
509
510 void HLRAlgo_PolyAlgo::Show (Standard_Address& Coordinates,
511                              Standard_Integer& Index,
512                              Standard_Boolean& reg1,
513                              Standard_Boolean& regn,
514                              Standard_Boolean& outl,
515                              Standard_Boolean& intl)
516 {
517   HLRAlgo_BiPoint& BP = mySegListIt.Value();
518   Standard_Address IndexPtr = BP.Indices();
519   Coordinates = BP.Coordinates();
520   Index = ShapeIndex;
521   reg1  = BP.Rg1Line();
522   regn  = BP.RgNLine();
523   outl  = BP.OutLine();
524   intl  = BP.IntLine();
525 }
526