+//modified by NIZNHY-PKV Thu Mar 19 14:13:52 2009f
+//=======================================================================
+// function:TreatPaveBlocks
+// purpose:
+//=======================================================================
+ void NMTTools_PaveFiller::TreatPaveBlocks (NMTTools_ListOfCommonBlock& theLCB)
+{
+ Standard_Boolean bFound;
+ Standard_Integer nE, nV, nVp, iFlag;
+ Standard_Real aT;
+ TColStd_MapOfInteger aMI;
+ TColStd_MapIteratorOfMapOfInteger aItMI;
+ NMTTools_ListIteratorOfListOfCommonBlock aItLCB;
+ BOPTools_ListIteratorOfListOfPaveBlock aItLPB;
+ BOPTools_ListIteratorOfListOfPave aItLP;
+ //
+ aItLCB.Initialize(theLCB);
+ for (; aItLCB.More(); aItLCB.Next()) {
+ const NMTTools_CommonBlock& aCB=aItLCB.Value();
+ //
+ aMI.Clear();
+ const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
+ //
+ // 1 -> aMI
+ aItLPB.Initialize(aLPB);
+ for (; aItLPB.More(); aItLPB.Next()) {
+ const BOPTools_PaveBlock& aPB=aItLPB.Value();
+ nE=aPB.OriginalEdge();
+ BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
+ BOPTools_ListOfPave& aLP=aPaveSet.ChangeSet();
+ //
+ aItLP.Initialize(aLP);
+ for (; aItLP.More(); aItLP.Next()) {
+ const BOPTools_Pave& aPave=aItLP.Value();
+ nV=aPave.Index();
+ aMI.Add(nV);
+ }
+ }//for (; anItLPB.More(); anItLPB.Next()) {
+ //
+ // 2
+ aItLPB.Initialize(aLPB);
+ for (; aItLPB.More(); aItLPB.Next()) {
+ const BOPTools_PaveBlock& aPB=aItLPB.Value();
+ nE=aPB.OriginalEdge();
+ BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
+ BOPTools_ListOfPave& aLP=aPaveSet.ChangeSet();
+ //
+ aItMI.Initialize(aMI);
+ for (; aItMI.More(); aItMI.Next()) {
+ nV=aItMI.Key();
+ bFound=Standard_False;
+ aItLP.Initialize(aLP);
+ for (; aItLP.More(); aItLP.Next()) {
+ const BOPTools_Pave& aPave=aItLP.Value();
+ nVp=aPave.Index();
+ if (nVp==nV) {
+ bFound=!bFound;
+ break;
+ }
+ }
+ //
+ if (!bFound) {
+ // Append Pave of nV to rhe edge nE
+ const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE));
+ const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV));
+ iFlag=myContext.ComputeVE (aV, aE, aT);
+ if (!iFlag) {
+ BOPTools_Pave aPave;
+ //
+ aPave.SetInterference(-1);
+ aPave.SetType (BooleanOperations_EdgeEdge);
+ aPave.SetIndex(nV);
+ aPave.SetParam(aT);
+ aPaveSet.Append(aPave);
+ }
+ }
+ }//for (; aItMI.More(); aItMI.Next()) {
+ }//for (; anItLPB.More(); anItLPB.Next()) {
+ }
+}
+//modified by NIZNHY-PKV Thu Mar 19 14:14:13 2009t