1 // Created on: 1995-07-11
2 // Created by: Christophe MARION
3 // Copyright (c) 1995-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 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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <HLRAlgo_BiPoint.hxx>
19 #include <HLRAlgo_PolyInternalData.hxx>
20 #include <Standard_Stream.hxx>
21 #include <Standard_Type.hxx>
23 IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyInternalData,Standard_Transient)
26 static Standard_Integer HLRAlgo_PolyInternalData_TRACE = Standard_False;
27 static Standard_Integer HLRAlgo_PolyInternalData_ERROR = Standard_False;
29 //=======================================================================
30 //function : PolyInternalData
32 //=======================================================================
34 HLRAlgo_PolyInternalData::HLRAlgo_PolyInternalData
35 (const Standard_Integer nbNod,
36 const Standard_Integer nbTri) :
42 myIntOutL(Standard_False),
43 myPlanar(Standard_False)
46 myMxPISeg = 2 + (3 * nbTri + nbNod) / 2;
47 myTData = new HLRAlgo_HArray1OfTData(0,myMxTData);
48 myPISeg = new HLRAlgo_HArray1OfPISeg(0,myMxPISeg);
49 myPINod = new HLRAlgo_HArray1OfPINod(0,myMxPINod);
51 HLRAlgo_Array1OfPINod& PINod = myPINod->ChangeArray1();
52 Handle(HLRAlgo_PolyInternalNode)* NN = &(PINod.ChangeValue(1));
54 for (i = 1; i <= myMxPINod; i++) {
55 *NN = new HLRAlgo_PolyInternalNode();
60 //=======================================================================
61 //function : UpdateLinks
63 //=======================================================================
65 void HLRAlgo_PolyInternalData::UpdateLinks
66 (HLRAlgo_Array1OfTData*& TData,
67 HLRAlgo_Array1OfPISeg*& PISeg,
68 HLRAlgo_Array1OfPINod*& PINod)
70 Standard_Integer i,n1,n2;
71 Standard_Integer find,iiii,icsv = 0;
72 HLRAlgo_PolyInternalSegment* aSegIndices = NULL;
74 Standard_Boolean newSeg = Standard_False;
75 HLRAlgo_TriangleData* TD =
76 &(((HLRAlgo_Array1OfTData*)TData)->ChangeValue(1));
78 for (i = 1; i <= myNbTData; i++) {
79 HLRAlgo_PolyInternalNode::NodeIndices& A1 =
80 PINod->ChangeValue(TD->Node1)->Indices();
81 HLRAlgo_PolyInternalNode::NodeIndices& A2 =
82 PINod->ChangeValue(TD->Node2)->Indices();
83 HLRAlgo_PolyInternalNode::NodeIndices& A3 =
84 PINod->ChangeValue(TD->Node3)->Indices();
89 newSeg = Standard_False;
90 if (A1.NdSg == 0 && A2.NdSg == 0) {
91 newSeg = Standard_True;
101 while (iiii != 0 && find == 0) {
102 aSegIndices = &PISeg->ChangeValue(iiii);
103 if (aSegIndices->LstSg1 == n1) {
104 if (aSegIndices->LstSg2 == n2) find = iiii;
105 else iiii = aSegIndices->NxtSg1;
109 if (aSegIndices->LstSg1 == n2) find = iiii;
110 else iiii = aSegIndices->NxtSg2;
115 newSeg = Standard_True;
117 if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
118 else aSegIndices->NxtSg2 = myNbPISeg;
120 else aSegIndices->Conex2 = i;
123 newSeg = Standard_True;
132 aSegIndices = &PISeg->ChangeValue(iiii);
133 if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
134 else { icsv = 2; iiii = aSegIndices->NxtSg2; }
136 if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
137 else aSegIndices->NxtSg2 = myNbPISeg;
139 else A2.NdSg = myNbPISeg;
143 aSegIndices = &PISeg->ChangeValue(myNbPISeg);
144 aSegIndices->LstSg1 = n1;
145 aSegIndices->LstSg2 = n2;
146 aSegIndices->Conex1 = i;
147 aSegIndices->Conex2 = 0;
148 aSegIndices->NxtSg1 = 0;
149 aSegIndices->NxtSg2 = 0;
156 newSeg = Standard_False;
157 if (A2.NdSg == 0 && A3.NdSg == 0) {
158 newSeg = Standard_True;
168 while (iiii != 0 && find == 0) {
169 aSegIndices = &PISeg->ChangeValue(iiii);
170 if (aSegIndices->LstSg1 == n1) {
171 if (aSegIndices->LstSg2 == n2) find = iiii;
172 else iiii = aSegIndices->NxtSg1;
176 if (aSegIndices->LstSg1 == n2) find = iiii;
177 else iiii = aSegIndices->NxtSg2;
182 newSeg = Standard_True;
184 if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
185 else aSegIndices->NxtSg2 = myNbPISeg;
187 else aSegIndices->Conex2 = i;
190 newSeg = Standard_True;
199 aSegIndices = &PISeg->ChangeValue(iiii);
200 if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
201 else { icsv = 2; iiii = aSegIndices->NxtSg2; }
203 if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
204 else aSegIndices->NxtSg2 = myNbPISeg;
206 else A3.NdSg = myNbPISeg;
210 aSegIndices = &PISeg->ChangeValue(myNbPISeg);
211 aSegIndices->LstSg1 = n1;
212 aSegIndices->LstSg2 = n2;
213 aSegIndices->Conex1 = i;
214 aSegIndices->Conex2 = 0;
215 aSegIndices->NxtSg1 = 0;
216 aSegIndices->NxtSg2 = 0;
223 newSeg = Standard_False;
224 if (A3.NdSg == 0 && A1.NdSg == 0) {
225 newSeg = Standard_True;
235 while (iiii != 0 && find == 0) {
236 aSegIndices = &PISeg->ChangeValue(iiii);
237 if (aSegIndices->LstSg1 == n1) {
238 if (aSegIndices->LstSg2 == n2) find = iiii;
239 else iiii = aSegIndices->NxtSg1;
243 if (aSegIndices->LstSg1 == n2) find = iiii;
244 else iiii = aSegIndices->NxtSg2;
249 newSeg = Standard_True;
251 if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
252 else aSegIndices->NxtSg2 = myNbPISeg;
254 else aSegIndices->Conex2 = i;
257 newSeg = Standard_True;
266 aSegIndices = &PISeg->ChangeValue(iiii);
267 if (aSegIndices->LstSg1 == n2) { icsv = 1; iiii = aSegIndices->NxtSg1; }
268 else { icsv = 2; iiii = aSegIndices->NxtSg2; }
270 if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
271 else aSegIndices->NxtSg2 = myNbPISeg;
273 else A1.NdSg = myNbPISeg;
277 aSegIndices = &PISeg->ChangeValue(myNbPISeg);
278 aSegIndices->LstSg1 = n1;
279 aSegIndices->LstSg2 = n2;
280 aSegIndices->Conex1 = i;
281 aSegIndices->Conex2 = 0;
282 aSegIndices->NxtSg1 = 0;
283 aSegIndices->NxtSg2 = 0;
290 //=======================================================================
293 //=======================================================================
296 HLRAlgo_PolyInternalData::AddNode (
297 HLRAlgo_PolyInternalNode::NodeData& Nod1RValues,
298 HLRAlgo_PolyInternalNode::NodeData& Nod2RValues,
299 HLRAlgo_Array1OfPINod*& PINod1,
300 HLRAlgo_Array1OfPINod*& PINod2,
301 const Standard_Real coef1,
302 const Standard_Real X3,
303 const Standard_Real Y3,
304 const Standard_Real Z3)
306 Standard_Real coef2 = 1 - coef1;
307 IncPINod(PINod1,PINod2);
308 Standard_Integer ip3 = myNbPINod;
309 Handle(HLRAlgo_PolyInternalNode)* pip3 =
310 &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(ip3));
311 *pip3 = new HLRAlgo_PolyInternalNode();
312 HLRAlgo_PolyInternalNode::NodeData& Nod3RValues = (*pip3)->Data();
313 HLRAlgo_PolyInternalNode::NodeIndices& aNodeIndices = (*pip3)->Indices();
314 aNodeIndices.NdSg = 0;
315 aNodeIndices.Flag = 0;
316 Nod3RValues.Point = gp_XYZ(X3, Y3, Z3);
317 Nod3RValues.UV = coef2 * Nod1RValues.UV + coef1 * Nod2RValues.UV;
318 Nod3RValues.Scal = Nod1RValues.Scal * coef2 + Nod2RValues.Scal * coef1;
319 const gp_XYZ aXYZ = coef2 * Nod1RValues.Normal + coef1 * Nod2RValues.Normal;
320 const Standard_Real aNorm = aXYZ.Modulus();
323 Nod3RValues.Normal = (1 / aNorm) * aXYZ;
326 Nod3RValues.Normal = gp_XYZ(1., 0., 0.);
328 if (HLRAlgo_PolyInternalData_ERROR)
329 std::cout << "HLRAlgo_PolyInternalData::AddNode" << std::endl;
335 //=======================================================================
336 //function : UpdateLinks
338 //=======================================================================
341 HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
342 const Standard_Integer ip2,
343 const Standard_Integer ip3,
344 HLRAlgo_Array1OfTData*& TData1,
345 HLRAlgo_Array1OfTData*& TData2,
346 HLRAlgo_Array1OfPISeg*& PISeg1,
347 HLRAlgo_Array1OfPISeg*& PISeg2,
348 HLRAlgo_Array1OfPINod*& PINod1,
349 HLRAlgo_Array1OfPINod*& )
351 Standard_Integer find,iiii,iisv,icsv,iip2 =0,cnx1 =0,cnx2 =0;
352 HLRAlgo_PolyInternalSegment* aSegIndices = NULL;
353 HLRAlgo_PolyInternalSegment* aSegIndices2 = NULL;
357 IncPISeg(PISeg1,PISeg2);
358 IncPISeg(PISeg1,PISeg2);
359 IncPISeg(PISeg1,PISeg2);
362 IncTData(TData1,TData2);
363 IncTData(TData1,TData2);
366 HLRAlgo_PolyInternalNode::NodeIndices* aNodIndices1 =
367 &PINod1->ChangeValue(ip1)->Indices();
368 HLRAlgo_PolyInternalNode::NodeIndices& aNodIndices2 =
369 PINod1->ChangeValue(ip2)->Indices();
370 HLRAlgo_PolyInternalNode::NodeIndices& aNodIndices3 =
371 PINod1->ChangeValue(ip3)->Indices();
372 iiii = aNodIndices2.NdSg;
374 while (iiii != 0 && find == 0) {
375 aSegIndices2 = &PISeg1->ChangeValue(iiii);
376 if (aSegIndices2->LstSg1 == ip2) {
377 if (aSegIndices2->LstSg2 == ip1) {
379 cnx1 = aSegIndices2->Conex1;
380 cnx2 = aSegIndices2->Conex2;
381 aSegIndices2->LstSg1 = ip3;
382 iip2 = aSegIndices2->NxtSg1;
383 aSegIndices2->NxtSg1 = myNbPISeg;
384 if (iisv == 0) aNodIndices2.NdSg = myNbPISeg;
385 else if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
386 else aSegIndices->NxtSg2 = myNbPISeg;
392 iiii = aSegIndices2->NxtSg1;
395 if (aSegIndices2->LstSg1 == ip1) {
397 cnx1 = aSegIndices2->Conex1;
398 cnx2 = aSegIndices2->Conex2;
399 aSegIndices2->LstSg2 = ip3;
400 iip2 = aSegIndices2->NxtSg2;
401 aSegIndices2->NxtSg2 = myNbPISeg;
402 if (iisv == 0) aNodIndices2.NdSg = myNbPISeg;
403 else if (icsv == 1) aSegIndices->NxtSg1 = myNbPISeg;
404 else aSegIndices->NxtSg2 = myNbPISeg;
410 iiii = aSegIndices2->NxtSg2;
412 aSegIndices = aSegIndices2;
417 if (HLRAlgo_PolyInternalData_ERROR) {
418 std::cout << "HLRAlgo_PolyInternalData::UpdateLinks : segment error";
419 std::cout << std::endl;
424 aSegIndices2 = &PISeg1->ChangeValue(myNbPISeg);
425 aSegIndices2->NxtSg1 = 0;
426 aSegIndices2->NxtSg2 = iip2;
427 aSegIndices2->LstSg1 = ip3;
428 aSegIndices2->LstSg2 = ip2;
429 aSegIndices2->Conex1 = cnx1;
430 aSegIndices2->Conex2 = cnx2;
431 aNodIndices3.NdSg = find;
433 Standard_Integer iOld,iNew,iTr,skip,ip4,itpk[2];
434 Standard_Integer n1,n2,n3,nOld[3],nNew[3],New[4];
436 New[2] = myNbTData + 1;
443 New[3] = myNbTData + 2;
446 for (skip = 0; skip <= 1; skip++) {
448 iNew = New[skip + 2];
450 HLRAlgo_TriangleData& aTriangle = TData1->ChangeValue(iOld);
451 HLRAlgo_TriangleData& aTriangle2 = TData1->ChangeValue(iNew);
452 n1 = aTriangle.Node1;
453 n2 = aTriangle.Node2;
454 n3 = aTriangle.Node3;
461 Standard_Boolean found = Standard_False;
462 if (n1 == ip1 && n2 == ip2) {
463 found = Standard_True;
468 else if (n1 == ip2 && n2 == ip1) {
469 found = Standard_True;
474 else if (n2 == ip1 && n3 == ip2) {
475 found = Standard_True;
480 else if (n2 == ip2 && n3 == ip1) {
481 found = Standard_True;
486 else if (n3 == ip1 && n1 == ip2) {
487 found = Standard_True;
492 else if (n3 == ip2 && n1 == ip1) {
493 found = Standard_True;
501 HLRAlgo_PolyInternalNode::NodeIndices& aNodIndices4 =
502 PINod1->ChangeValue(ip4)->Indices();
503 aTriangle.Node1 = nOld[0];
504 aTriangle.Node2 = nOld[1];
505 aTriangle.Node3 = nOld[2];
506 aTriangle2.Node1 = nNew[0];
507 aTriangle2.Node2 = nNew[1];
508 aTriangle2.Node3 = nNew[2];
509 aTriangle2.Flags = aTriangle.Flags;
511 aSegIndices2 = &PISeg1->ChangeValue(myNbPISeg);
512 aSegIndices2->LstSg1 = ip3;
513 aSegIndices2->LstSg2 = ip4;
514 aSegIndices2->NxtSg1 = aNodIndices3.NdSg;
515 aSegIndices2->NxtSg2 = aNodIndices4.NdSg;
516 aSegIndices2->Conex1 = iOld;
517 aSegIndices2->Conex2 = iNew;
518 aNodIndices3.NdSg = myNbPISeg;
519 aNodIndices4.NdSg = myNbPISeg;
522 else if (HLRAlgo_PolyInternalData_ERROR) {
523 std::cout << "HLRAlgo_PolyInternalData::UpdateLinks : triangle error ";
524 std::cout << std::endl;
530 for (iTr = 0; iTr <= 3; iTr++) {
532 if (iTr < 2) skip = iTr;
537 HLRAlgo_TriangleData& aTriangle2 = TData1->ChangeValue(iNew);
538 n1 = aTriangle2.Node1;
539 n2 = aTriangle2.Node2;
540 n3 = aTriangle2.Node3;
542 if (!((n1 == ip3 && n2 == ip4) ||
543 (n2 == ip3 && n1 == ip4))) {
544 Standard_Boolean found = Standard_False;
545 aNodIndices1 = &PINod1->ChangeValue(n1)->Indices();
546 iiii = aNodIndices1->NdSg;
548 while (iiii != 0 && !found) {
549 aSegIndices2 = &PISeg1->ChangeValue(iiii);
550 if (aSegIndices2->LstSg1 == n1) {
551 if (aSegIndices2->LstSg2 == n2) {
552 found = Standard_True;
553 if (aSegIndices2->Conex1 == iOld) aSegIndices2->Conex1 = iNew;
554 else if (aSegIndices2->Conex2 == iOld) aSegIndices2->Conex2 = iNew;
556 else iiii = aSegIndices2->NxtSg1;
559 if (aSegIndices2->LstSg1 == n2) {
560 found = Standard_True;
561 if (aSegIndices2->Conex1 == iOld) aSegIndices2->Conex1 = iNew;
562 else if (aSegIndices2->Conex2 == iOld) aSegIndices2->Conex2 = iNew;
564 else iiii = aSegIndices2->NxtSg2;
569 if (!((n2 == ip3 && n3 == ip4) ||
570 (n3 == ip3 && n2 == ip4))) {
571 Standard_Boolean found = Standard_False;
572 aNodIndices1 = &PINod1->ChangeValue(n2)->Indices();
573 iiii = aNodIndices1->NdSg;
575 while (iiii != 0 && !found) {
576 aSegIndices2 = &PISeg1->ChangeValue(iiii);
577 if (aSegIndices2->LstSg1 == n2) {
578 if (aSegIndices2->LstSg2 == n3) {
579 found = Standard_True;
580 if (aSegIndices2->Conex1 == iOld) aSegIndices2->Conex1 = iNew;
581 else if (aSegIndices2->Conex2 == iOld) aSegIndices2->Conex2 = iNew;
583 else iiii = aSegIndices2->NxtSg1;
586 if (aSegIndices2->LstSg1 == n3) {
587 found = Standard_True;
588 if (aSegIndices2->Conex1 == iOld) aSegIndices2->Conex1 = iNew;
589 else if (aSegIndices2->Conex2 == iOld) aSegIndices2->Conex2 = iNew;
591 else iiii = aSegIndices2->NxtSg2;
596 if (!((n3 == ip3 && n1 == ip4) ||
597 (n1 == ip3 && n3 == ip4))) {
598 Standard_Boolean found = Standard_False;
599 aNodIndices1 = &PINod1->ChangeValue(n3)->Indices();
600 iiii = aNodIndices1->NdSg;
602 while (iiii != 0 && !found) {
603 aSegIndices2 = &PISeg1->ChangeValue(iiii);
604 if (aSegIndices2->LstSg1 == n3) {
605 if (aSegIndices2->LstSg2 == n1) {
606 found = Standard_True;
607 if (aSegIndices2->Conex1 == iOld) aSegIndices2->Conex1 = iNew;
608 else if (aSegIndices2->Conex2 == iOld) aSegIndices2->Conex2 = iNew;
610 else iiii = aSegIndices2->NxtSg1;
613 if (aSegIndices2->LstSg1 == n1) {
614 found = Standard_True;
615 if (aSegIndices2->Conex1 == iOld) aSegIndices2->Conex1 = iNew;
616 else if (aSegIndices2->Conex2 == iOld) aSegIndices2->Conex2 = iNew;
618 else iiii = aSegIndices2->NxtSg2;
627 //=======================================================================
630 //=======================================================================
632 void HLRAlgo_PolyInternalData::Dump () const
634 Standard_Integer i;//,i1,i2,i3;
635 HLRAlgo_Array1OfTData* TData = &myTData->ChangeArray1();
636 HLRAlgo_Array1OfPISeg* PISeg = &myPISeg->ChangeArray1();
637 HLRAlgo_Array1OfPINod* PINod = &myPINod->ChangeArray1();
639 for (i = 1; i <= myNbPINod; i++) {
640 const Handle(HLRAlgo_PolyInternalNode)* pi = &PINod->ChangeValue(i);
641 HLRAlgo_PolyInternalNode::NodeIndices& aNodIndices1 = (*pi)->Indices();
642 HLRAlgo_PolyInternalNode::NodeData& Nod1RValues = (*pi)->Data();
643 std::cout << "Node " << std::setw(6) << i << " : ";
644 std::cout << std::setw(6) << aNodIndices1.NdSg;
645 std::cout << std::setw(20)<< Nod1RValues.Point.X();
646 std::cout << std::setw(20)<< Nod1RValues.Point.Y();
647 std::cout << std::setw(20)<< Nod1RValues.Point.Z();
648 std::cout << std::endl;
651 for (i = 1; i <= myNbPISeg; i++) {
652 HLRAlgo_PolyInternalSegment* aSegIndices = &PISeg->ChangeValue(i);
653 std::cout << "Segment " << std::setw(6) << i << " : ";
654 std::cout << std::setw(6) << aSegIndices->LstSg1;
655 std::cout << std::setw(6) << aSegIndices->LstSg2;
656 std::cout << std::setw(6) << aSegIndices->NxtSg1;
657 std::cout << std::setw(6) << aSegIndices->NxtSg2;
658 std::cout << std::setw(6) << aSegIndices->Conex1;
659 std::cout << std::setw(6) << aSegIndices->Conex2;
660 std::cout << std::endl;
663 for (i = 1; i <= myNbTData; i++) {
664 HLRAlgo_TriangleData& aTriangle = TData->ChangeValue(i);
665 std::cout << "Triangle " << std::setw(6) << i << " : ";
666 std::cout << std::setw(6) << aTriangle.Node1;
667 std::cout << std::setw(6) << aTriangle.Node2;
668 std::cout << std::setw(6) << aTriangle.Node3;
669 std::cout << std::endl;
673 //=======================================================================
674 //function : IncTData
676 //=======================================================================
678 void HLRAlgo_PolyInternalData::IncTData(
679 HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfTData*& TData2)
681 if (myNbTData >= myMxTData) {
683 if (HLRAlgo_PolyInternalData_TRACE)
684 std::cout << "HLRAlgo_PolyInternalData::IncTData : " << myMxTData << std::endl;
686 Standard_Integer i,j,k;
690 Handle(HLRAlgo_HArray1OfTData) NwTData =
691 new HLRAlgo_HArray1OfTData(0,k);
692 HLRAlgo_Array1OfTData& oTData = myTData->ChangeArray1();
693 HLRAlgo_Array1OfTData& nTData = NwTData->ChangeArray1();
695 for (i = 1; i <= j; i++)
697 nTData.ChangeValue(i) = oTData.Value(i);
701 if (TData1 == TData2) {
712 //=======================================================================
713 //function : IncPISeg
715 //=======================================================================
717 void HLRAlgo_PolyInternalData::IncPISeg(
718 HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPISeg*& PISeg2)
720 if (myNbPISeg >= myMxPISeg) {
722 if (HLRAlgo_PolyInternalData_TRACE)
723 std::cout << "HLRAlgo_PolyInternalData::IncPISeg : " << myMxPISeg << std::endl;
725 Standard_Integer i,j,k;
728 Handle(HLRAlgo_HArray1OfPISeg) NwPISeg =
729 new HLRAlgo_HArray1OfPISeg(0,k);
730 HLRAlgo_Array1OfPISeg& oPISeg = myPISeg->ChangeArray1();
731 HLRAlgo_Array1OfPISeg& nPISeg = NwPISeg->ChangeArray1();
733 for (i = 1; i <= j; i++)
735 nPISeg.ChangeValue(i) = oPISeg.Value(i);
739 if (PISeg1 == PISeg2) {
750 //=======================================================================
751 //function : IncPINod
753 //=======================================================================
755 void HLRAlgo_PolyInternalData::IncPINod(
756 HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_Array1OfPINod*& PINod2)
758 if (myNbPINod >= myMxPINod) {
760 if (HLRAlgo_PolyInternalData_TRACE)
761 std::cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << std::endl;
763 Standard_Integer i,j,k;
766 Handle(HLRAlgo_HArray1OfPINod) NwPINod =
767 new HLRAlgo_HArray1OfPINod(0,k);
768 HLRAlgo_Array1OfPINod& oPINod = myPINod->ChangeArray1();
769 HLRAlgo_Array1OfPINod& nPINod = NwPINod->ChangeArray1();
770 Handle(HLRAlgo_PolyInternalNode)* ON = &(oPINod.ChangeValue(1));
771 Handle(HLRAlgo_PolyInternalNode)* NN = &(nPINod.ChangeValue(1));
773 for (i = 1; i <= j; i++) {
780 if (PINod1 == PINod2) {