1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: NMTTools_PaveFiller_7.cxx
25 // Author: Peter KURNEV
28 #include <NMTTools_PaveFiller.ixx>
30 #include <Bnd_HArray1OfBox.hxx>
31 #include <Bnd_BoundSortBox.hxx>
32 #include <Bnd_Box.hxx>
33 #include <BRepBndLib.hxx>
35 #include <TColStd_MapOfInteger.hxx>
36 #include <TColStd_ListIteratorOfListOfInteger.hxx>
37 #include <TopTools_DataMapOfShapeListOfInteger.hxx>
38 #include <TColStd_ListOfInteger.hxx>
39 #include <TColStd_IndexedMapOfInteger.hxx>
41 #include <GeomAPI_ProjectPointOnCurve.hxx>
43 #include <TopAbs_Orientation.hxx>
45 #include <TopoDS_Vertex.hxx>
46 #include <TopoDS_Edge.hxx>
48 #include <TopoDS_Shape.hxx>
49 #include <TopoDS_Compound.hxx>
51 #include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx>
52 #include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx>
53 #include <TopTools_DataMapOfShapeInteger.hxx>
54 #include <TopTools_DataMapOfShapeShape.hxx>
55 #include <TopTools_DataMapOfShapeListOfInteger.hxx>
56 #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx>
57 #include <TopTools_DataMapOfIntegerShape.hxx>
59 #include <BRep_Builder.hxx>
60 #include <BRep_Tool.hxx>
62 #include <TopExp_Explorer.hxx>
65 #include <IntTools_SequenceOfPntOn2Faces.hxx>
66 #include <IntTools_PntOnFace.hxx>
67 #include <IntTools_PntOn2Faces.hxx>
69 #include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
71 #include <BOPTools_SSInterference.hxx>
72 #include <BOPTools_CArray1OfSSInterference.hxx>
73 #include <BOPTools_CArray1OfVVInterference.hxx>
74 #include <BOPTools_VVInterference.hxx>
75 #include <BOPTools_Tools.hxx>
76 #include <BOPTools_ListOfPaveBlock.hxx>
77 #include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
78 #include <BOPTools_PaveBlock.hxx>
79 #include <BOPTools_Pave.hxx>
80 #include <BOPTools_Tools.hxx>
82 #include <NMTDS_Iterator.hxx>
83 #include <NMTDS_ShapesDataStructure.hxx>
84 #include <NMTDS_InterfPool.hxx>
86 #include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
87 #include <NMTTools_MapOfPaveBlock.hxx>
90 //=======================================================================
91 // function: MakeSplitEdges
93 //=======================================================================
94 void NMTTools_PaveFiller::MakeSplitEdges()
96 myIsDone=Standard_False;
98 Standard_Boolean bIsNewVertex1, bIsNewVertex2;
99 Standard_Integer i, aNbS, nV1, nV2, aNbPaveBlocks, aNewShapeIndex;
100 Standard_Real t1, t2;
101 TopAbs_Orientation anOri;
102 TopoDS_Edge aE, aESplit;
103 TopoDS_Vertex aV1, aV2;
105 aNbS=myDS->NumberOfShapesOfTheObject();
106 for (i=1; i<=aNbS; ++i) {
107 if (myDS->GetShapeType(i) != TopAbs_EDGE)
111 aE=TopoDS::Edge(myDS->Shape(i));
112 if (BRep_Tool::Degenerated(aE)){
116 anOri=aE.Orientation();
117 aE.Orientation(TopAbs_FORWARD);
119 // Making Split Edges
121 // Split Set for the Original Edge i
122 BOPTools_ListOfPaveBlock& aSplitEdges=mySplitShapesPool(myDS->RefEdge(i));
123 BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
125 aNbPaveBlocks=aSplitEdges.Extent();
127 for (; aPBIt.More(); aPBIt.Next()) {
128 BOPTools_PaveBlock& aPB=aPBIt.Value();
130 const BOPTools_Pave& aPave1=aPB.Pave1();
133 aV1=TopoDS::Vertex(myDS->GetShape(nV1));
134 aV1.Orientation(TopAbs_FORWARD);
136 const BOPTools_Pave& aPave2=aPB.Pave2();
139 aV2=TopoDS::Vertex(myDS->GetShape(nV2));
140 aV2.Orientation(TopAbs_REVERSED);
142 if (aNbPaveBlocks==1) {
143 bIsNewVertex1=myDS->IsNewShape (nV1);
144 bIsNewVertex2=myDS->IsNewShape (nV2);
145 if (!bIsNewVertex1 && !bIsNewVertex2) {
151 BOPTools_Tools::MakeSplitEdge(aE, aV1, t1, aV2, t2, aESplit);
153 // Add Split Part of the Original Edge to the DS
154 BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
156 anASSeq.SetNewSuccessor(nV1);
157 anASSeq.SetNewOrientation(aV1.Orientation());
159 anASSeq.SetNewSuccessor(nV2);
160 anASSeq.SetNewOrientation(aV2.Orientation());
162 if (anOri==TopAbs_INTERNAL) {
163 anASSeq.SetNewAncestor(i);
164 aESplit.Orientation(anOri);
167 myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq);
168 aNewShapeIndex=myDS->NumberOfInsertedShapes();
169 myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN);
171 // Fill Split Set for the Original Edge
172 aPB.SetEdge(aNewShapeIndex);
176 myIsDone=Standard_True;
178 //modified by NIZNHY-PKV Mon Dec 12 09:16:37 2011f
179 //=======================================================================
180 // function: UpdateCommonBlocks
182 //=======================================================================
183 void NMTTools_PaveFiller::UpdateCommonBlocks(const Standard_Integer)
186 Standard_Integer nE, aNbS, nEx, nEMax, j, aNbPoints;
187 Standard_Real aTolEx, aTolExMax, aTSRMax[2], aTx[2], aTmp;
190 BOPTools_ListIteratorOfListOfPaveBlock aItLPB, aItLPBS;
191 NMTTools_ListIteratorOfListOfCommonBlock aItLCB;
192 NMTTools_MapOfPaveBlock aMPB;
194 myIsDone=Standard_False;
196 aNbS=myDS->NumberOfShapesOfTheObject();
197 for (nE=1; nE<=aNbS; ++nE) {
198 if (myDS->GetShapeType(nE)!=TopAbs_EDGE){
202 const TopoDS_Edge& aE=*((TopoDS_Edge*)&myDS->Shape(nE));
203 if (BRep_Tool::Degenerated(aE)){
207 NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE));
210 aItLCB.Initialize(aLCB);
211 for (; aItLCB.More(); aItLCB.Next()) {
212 NMTTools_CommonBlock& aCB=aItLCB.Value();
214 BOPTools_PaveBlock aPBMax;
216 const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks();
217 aItLPB.Initialize(aLPB);
218 for (; aItLPB.More(); aItLPB.Next()) {
219 const BOPTools_PaveBlock& aPBx=aItLPB.Value();
220 nEx=aPBx.OriginalEdge();
221 const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx));
222 aTolEx=BRep_Tool::Tolerance(aEx);
223 if (aTolEx>aTolExMax) {
231 if (aMPB.Contains(aPBMax)) {
236 nEMax=aPBMax.OriginalEdge();
237 const IntTools_ShrunkRange& aISRMax=aPBMax.ShrunkRange();
238 const IntTools_Range& aSRMax=aISRMax.ShrunkRange();
239 const Bnd_Box& aBoxMax=aISRMax.BndBox();
240 aSRMax.Range(aTSRMax[0], aTSRMax[1]);
241 for (j=0; j<2; ++j) {
242 BOPTools_Tools::PointOnEdge(aEMax, aTSRMax[j], aPMax[j]);
246 aItLPB.Initialize(aLPB);
247 for (; aItLPB.More(); aItLPB.Next()) {
248 const BOPTools_PaveBlock& aPBx=aItLPB.Value();
249 nEx=aPBx.OriginalEdge();
254 const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx));
255 GeomAPI_ProjectPointOnCurve& aPPCx=myContext.ProjPC(aEx);
257 for (j=0; j<2; ++j) {
258 aPPCx.Perform(aPMax[j]);
259 aNbPoints=aPPCx.NbPoints();
263 aTx[j]=aPPCx.LowerDistanceParameter();
266 // correction the range is impossible due to
267 // a projection problem
280 const IntTools_ShrunkRange& aISRx=aPBx.ShrunkRange();
281 IntTools_Range *pSRx=(IntTools_Range *)(&aISRx.ShrunkRange());
282 Bnd_Box *pBoxx=(Bnd_Box *)(&aISRx.BndBox());
284 pSRx->SetFirst(aTx[0]);
285 pSRx->SetLast(aTx[1]);
290 BOPTools_ListOfPaveBlock& aLPBSx=mySplitShapesPool(myDS->RefEdge(nEx));
291 aItLPBS.Initialize(aLPBSx);
292 for (; aItLPBS.More(); aItLPBS.Next()) {
293 const BOPTools_PaveBlock& aPBSx=aItLPBS.Value();
294 if (!aPBSx.IsEqual(aPBx)) {
298 const IntTools_ShrunkRange& aISRx=aPBSx.ShrunkRange();
299 IntTools_Range *pSRx=(IntTools_Range *)(&aISRx.ShrunkRange());
300 Bnd_Box *pBoxx=(Bnd_Box *)(&aISRx.BndBox());
302 pSRx->SetFirst(aTx[0]);
303 pSRx->SetLast(aTx[1]);
308 }//for (; aItLPB.More(); aItLPB.Next()) {
309 }//for (; aItLCB.More(); aItLCB.Next()) {
310 }//for (nE=1; nE<=aNbS; ++nE) {
312 //modified by NIZNHY-PKV Mon Dec 12 09:16:44 2011t
313 //=======================================================================
314 // function: UpdateCommonBlocks
316 //=======================================================================
317 void NMTTools_PaveFiller::UpdateCommonBlocks()
319 myIsDone=Standard_False;
321 Standard_Integer nE, aNbS, nSp, nEx, nSpx;
322 NMTTools_ListIteratorOfListOfCommonBlock aCBIt;
323 BOPTools_ListIteratorOfListOfPaveBlock aPBIt;
325 aNbS=myDS->NumberOfShapesOfTheObject();
327 for (nE=1; nE<=aNbS; ++nE) {
328 if (myDS->GetShapeType(nE)!=TopAbs_EDGE){
331 if (BRep_Tool::Degenerated(TopoDS::Edge(myDS->Shape(nE)))){
335 NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE));
336 /*BOPTools_ListOfPaveBlock& aLPB=*/mySplitShapesPool (myDS->RefEdge(nE));
338 aCBIt.Initialize(aLCB);
339 for (; aCBIt.More(); aCBIt.Next()) {
340 NMTTools_CommonBlock& aCB=aCBIt.Value();
342 // Among all PBs of aCB the first PB will be one
343 // that have max tolerance value
345 Standard_Real aTolEx, aTolExMax;
346 BOPTools_ListOfPaveBlock *pLPB, aLPBx;
349 pLPB=(BOPTools_ListOfPaveBlock *)&aCB.PaveBlocks();
350 aPBIt.Initialize(*pLPB);
351 for (; aPBIt.More(); aPBIt.Next()) {
352 const BOPTools_PaveBlock& aPBx=aPBIt.Value();
353 nEx=aPBx.OriginalEdge();
354 const TopoDS_Edge& aEx=TopoDS::Edge(myDS->Shape(nEx));
355 aTolEx=BRep_Tool::Tolerance(aEx);
356 if (aTolEx>aTolExMax) {
369 BOPTools_PaveBlock& aPB=aCB.PaveBlock1(nE);
373 const BOPTools_ListOfPaveBlock& aCBLPB=aCB.PaveBlocks();
374 aPBIt.Initialize(aCBLPB);
375 for (; aPBIt.More(); aPBIt.Next()) {
376 BOPTools_PaveBlock& aPBx=aPBIt.Value();
377 nEx=aPBx.OriginalEdge();
382 nSpx=SplitIndex(aPBx);
389 //=======================================================================
390 // function: SplitIndex
392 //=======================================================================
393 Standard_Integer NMTTools_PaveFiller::SplitIndex
394 (const BOPTools_PaveBlock& aPBx)const
396 Standard_Integer anOriginalEdge, anEdgeIndex=0;
398 anOriginalEdge=aPBx.OriginalEdge();
400 const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(anOriginalEdge));
402 BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB);
403 for (; anIt.More(); anIt.Next()) {
404 BOPTools_PaveBlock& aPB=anIt.Value();
405 if (aPB.IsEqual(aPBx)) {
406 anEdgeIndex=aPB.Edge();
412 //=======================================================================
413 // function: UpdatePaveBlocks
415 //=======================================================================
416 void NMTTools_PaveFiller::UpdatePaveBlocks()
418 myIsDone=Standard_False;
421 Standard_Integer i, aNbFFs, nF1, nF2, aNbF, nF, iRankF, nE, nV1, nV2, aNbPB;
422 Standard_Real aT1, aT2;
423 TColStd_IndexedMapOfInteger aMF, aME;
424 TopExp_Explorer aExp;
425 TopoDS_Vertex aV1, aV2;
427 BOPTools_Pave aPave1, aPave2;
428 BOPTools_PaveBlock aPB;
430 BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
432 aNbFFs=aFFs.Extent();
433 for (i=1; i<=aNbFFs; ++i) {
434 BOPTools_SSInterference& aFFi=aFFs(i);
435 aFFi.Indices(nF1, nF2);
441 for(i=1; i<=aNbF; ++i) {
443 iRankF=myDS->Rank(nF);
444 const TopoDS_Shape aF=myDS->Shape(nF);//mpv
445 aExp.Init(aF, TopAbs_EDGE);
446 for(; aExp.More(); aExp.Next()) {
447 aE=TopoDS::Edge(aExp.Current());
449 if (BRep_Tool::Degenerated(aE)) {
453 nE=myDS->ShapeIndex(aE, iRankF);
455 if (aME.Contains(nE)) {
460 BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
465 TopExp::Vertices(aE, aV1, aV2);
467 nV1=myDS->ShapeIndex(aV1, iRankF);
468 aT1=BRep_Tool::Parameter(aV1, aE);
469 aPave1.SetIndex(nV1);
470 aPave1.SetParam(aT1);
472 nV2=myDS->ShapeIndex(aV2, iRankF);
473 aT2=BRep_Tool::Parameter(aV2, aE);
474 aPave2.SetIndex(nV2);
475 aPave2.SetParam(aT2);
478 aPB.SetOriginalEdge(nE);
479 aPB.SetPave1(aPave1);
480 aPB.SetPave2(aPave2);
486 //=======================================================================
487 // function: MakeAloneVertices
489 //=======================================================================
490 void NMTTools_PaveFiller::MakeAloneVertices()
492 Standard_Integer i, aNbFFs, nF1, nF2, j, aNbPnts, nFx, aNbV;
493 Standard_Real aTolF1, aTolF2, aTolSum, aTolV;
494 TColStd_ListIteratorOfListOfInteger aIt;
495 TColStd_ListOfInteger aLI;
497 TopoDS_Compound aCompound;
499 TopTools_DataMapOfShapeListOfInteger aDMVFF, aDMVFF1;
500 TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger aItDMVFF;
501 TopTools_DataMapOfShapeShape aDMVV;
502 TopTools_DataMapOfIntegerShape aDMIV;
503 TopTools_DataMapOfShapeInteger aDMVI;
504 TopTools_DataMapIteratorOfDataMapOfShapeInteger aItDMVI;
505 TopTools_DataMapIteratorOfDataMapOfIntegerShape aItDMIV;
507 aBB.MakeCompound(aCompound);
509 myAloneVertices.Clear();
511 BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
513 // 1. Collect alone vertices from FFs
515 aNbFFs=aFFs.Extent();
516 for (i=1; i<=aNbFFs; ++i) {
517 BOPTools_SSInterference& aFFi=aFFs(i);
518 aFFi.Indices(nF1, nF2);
520 const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
521 const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
523 aTolF1=BRep_Tool::Tolerance(aF1);
524 aTolF2=BRep_Tool::Tolerance(aF2);
525 aTolSum=aTolF1+aTolF2;
531 const IntTools_SequenceOfPntOn2Faces& aSeqAlonePnts=aFFi.AlonePnts();
532 aNbPnts=aSeqAlonePnts.Length();
533 for (j=1; j<=aNbPnts; ++j) {
534 const gp_Pnt& aP=aSeqAlonePnts(j).P1().Pnt();
535 BOPTools_Tools::MakeNewVertex(aP, aTolSum, aV);
536 aDMVFF.Bind(aV, aLI);
537 aBB.Add(aCompound, aV);
545 // 2. Try to fuse alone vertices themselves;
546 FuseVertices(aCompound, aDMVV);
548 // if some are fused, replace them by new ones
549 aItDMVFF.Initialize(aDMVFF);
550 for (; aItDMVFF.More(); aItDMVFF.Next()) {
551 const TopoDS_Shape& aVx=aItDMVFF.Key();
552 const TColStd_ListOfInteger& aLIx=aItDMVFF.Value();
554 if (!aDMVV.IsBound(aVx)) {
555 aDMVFF1.Bind(aVx, aLIx);
558 const TopoDS_Shape& aVy=aDMVV.Find(aVx);
560 if (aDMVFF1.IsBound(aVy)) {
561 TColStd_ListOfInteger& aLIy=aDMVFF1.ChangeFind(aVy);
562 aIt.Initialize(aLIx);
563 for(; aIt.More(); aIt.Next()) {
569 aDMVFF1.Bind(aVy, aLIx);
575 // refine lists of faces in aDMVFF1;
576 aItDMVFF.Initialize(aDMVFF1);
577 for (; aItDMVFF.More(); aItDMVFF.Next()) {
578 TColStd_MapOfInteger aMIy;
579 TColStd_ListOfInteger aLIy;
581 const TopoDS_Shape& aVx=aItDMVFF.Key();
582 TColStd_ListOfInteger& aLIx=aDMVFF1.ChangeFind(aVx);
583 aIt.Initialize(aLIx);
584 for(; aIt.More(); aIt.Next()) {
593 //==================================
595 // 3. Collect vertices from DS
596 Standard_Integer aNbS, nV, nVSD, aNbVDS, i1, i2, aNbVSD;
598 aNbS=myDS->NumberOfShapesOfTheObject();
600 for (i=1; i<=aNbS; ++i) {
601 const TopoDS_Shape& aS=myDS->Shape(i);
602 if (aS.ShapeType() != TopAbs_VERTEX){
606 nVSD=FindSDVertex(i);
607 nV=(nVSD) ? nVSD : i;
608 const TopoDS_Shape& aVx=myDS->Shape(nV);
609 if (!aDMVI.IsBound(aVx)) {
614 i1=myDS->NumberOfSourceShapes()+1;
615 i2=myDS->NumberOfInsertedShapes();
616 for (i=i1; i<=i2; ++i) {
617 const TopoDS_Shape aS=myDS->Shape(i);//mpv
618 if (aS.ShapeType() != TopAbs_VERTEX){
621 if (!aDMVI.IsBound(aS)) {
626 // 4. Initialize BoundSortBox on aDMVI
628 Handle(Bnd_HArray1OfBox) aHAB;
629 Bnd_BoundSortBox aBSB;
631 aNbVDS=aDMVI.Extent();
632 aHAB=new Bnd_HArray1OfBox(1, aNbVDS);
634 aItDMVI.Initialize(aDMVI);
635 for (i=1; aItDMVI.More(); aItDMVI.Next(), ++i) {
639 aV=TopoDS::Vertex(aItDMVI.Key());
640 aTolV=BRep_Tool::Tolerance(aV);
642 BRepBndLib::Add(aV, aBox);
643 aHAB->SetValue(i, aBox);
647 aBSB.Initialize(aHAB);
650 aItDMVFF.Initialize(aDMVFF1);
651 for (; aItDMVFF.More(); aItDMVFF.Next()) {
654 const TColStd_ListOfInteger& aLIFF=aItDMVFF.Value();
655 aV=TopoDS::Vertex(aItDMVFF.Key());
657 aTolV=BRep_Tool::Tolerance(aV);
659 BRepBndLib::Add(aV, aBoxV);
661 const TColStd_ListOfInteger& aLIVSD=aBSB.Compare(aBoxV);
662 aNbVSD=aLIVSD.Extent();
664 // add new vertex in DS and update map myAloneVertices
665 BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
667 myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq);
668 nV=myDS->NumberOfInsertedShapes();
670 aIt.Initialize(aLIFF);
671 for (; aIt.More(); aIt.Next()) {
673 if (myAloneVertices.Contains(nFx)) {
674 TColStd_IndexedMapOfInteger& aMVx=myAloneVertices.ChangeFromKey(nFx);
678 TColStd_IndexedMapOfInteger aMVx;
680 myAloneVertices.Add(nFx, aMVx);
687 Standard_Integer aNbF, aNbAV, nF, k;
688 NMTTools_IndexedDataMapOfIndexedMapOfInteger aMAVF;
690 aNbF=myAloneVertices.Extent();
695 // 1. fill map Alone Vertex/Face -> aMAVF
696 for (i=1; i<=aNbF; ++i) {
697 nF=myAloneVertices.FindKey(i);
698 const TColStd_IndexedMapOfInteger& aMAV=myAloneVertices(i);
700 for(j=1; j<=aNbAV; ++j) {
702 if (aMAVF.Contains(nV)) {
703 TColStd_IndexedMapOfInteger& aMF=aMAVF.ChangeFromKey(nV);
707 TColStd_IndexedMapOfInteger aMF;
714 // 2 Obtain pairs of faces
715 aNbAV=aMAVF.Extent();
716 for (i=1; i<=aNbAV; ++i) {
717 const TColStd_IndexedMapOfInteger& aMF=aMAVF(i);
719 for(j=1; j<aNbF; ++j) {
721 for(k=j+1; k<=aNbF; ++k) {
723 myIP->Add(nF1, nF2, Standard_True, NMTDS_TI_FF);
730 //=======================================================================
731 // function: AloneVertices
733 //=======================================================================
734 const NMTTools_IndexedDataMapOfIndexedMapOfInteger&
735 NMTTools_PaveFiller::AloneVertices()const
737 return myAloneVertices;
739 //=======================================================================
740 // function: FuseVertices
742 //=======================================================================
743 void NMTTools_PaveFiller::FuseVertices
744 (const TopoDS_Shape& aCompound,
745 TopTools_DataMapOfShapeShape& aDMVV)const
747 Standard_Integer i, aNbVV, n1, n2, nX;
748 NMTTools_PaveFiller tPF;
750 tPF.SetCompositeShape(aCompound);
755 //tPF.PerformNewVertices(); //qq
757 NMTDS_ShapesDataStructure& tDS=*(tPF.DS());
758 NMTDS_InterfPool& tInterfPool=*(tPF.IP());
759 BOPTools_CArray1OfVVInterference& aVVt=tInterfPool.VVInterferences();
762 for (i=1; i<=aNbVV; ++i) {
763 const BOPTools_VVInterference& aVV=aVVt(i);
767 const TopoDS_Shape& aV1=tDS.Shape(n1);
768 const TopoDS_Shape& aV2=tDS.Shape(n2);
769 const TopoDS_Shape& aVx=tDS.Shape(nX);
770 aDMVV.Bind(aV1, aVx);
771 aDMVV.Bind(aV2, aVx);