+ //
+ //modified by NIZNHY-PKV Fri Sep 14 10:00:44 2012f
+ BOP_WireEdgeSet aWES1 (myFace);
+ //
+ for (j=1; j<=aNbj; j++) {
+ iFF=aFFIndicesMap(j);
+ BOPTools_SSInterference& aFF=aFFs(iFF);
+ bIsTouch=aFF.IsTangentFaces();
+ if (bIsTouch) {
+ nF2=aFF.OppositeIndex(nF1);
+ AddINON2DPartsSh(nF1, iFF, aWES1);
+ }
+ }
+ //
+ if (iRank==2 || (iRank==1 && myOperation==BOP_CUT)) {
+ // #0023431
+ // Refine WES to remove duplicated edges:
+ // - for the faces of the Object: Cut operation
+ // - for the faces of the Tool: all operations
+ //
+ // The duplications caused by the separated treatment
+ // the faces of an argument for the cases when:
+ // -these faces contain shared edges and
+ // -they are same domain faces with the faces of the other argument.
+ TopTools_DataMapOfShapeInteger aDMSI;
+
+ //--
+ aWES1.InitStartElements();
+ for (; aWES1.MoreStartElements(); aWES1.NextStartElement()) {
+ const TopoDS_Edge& aE=*((TopoDS_Edge*)&aWES1.StartElement());
+ if (!aDMSI.IsBound(aE)) {
+ Standard_Integer iCnt=1;
+ //
+ aDMSI.Bind(aE, iCnt);
+ }
+ else {
+ Standard_Integer& iCnt=aDMSI.ChangeFind(aE);
+ ++iCnt;
+ }
+ }
+ //
+ aWES1.InitStartElements();
+ for (; aWES1.MoreStartElements(); aWES1.NextStartElement()) {
+ const TopoDS_Shape& aE=aWES1.StartElement();
+ const Standard_Integer& iCnt=aDMSI.Find(aE);
+ if (iCnt==1) {
+ aWES.AddStartElement(aE);
+ }
+ }
+ }
+ else {
+ aWES1.InitStartElements();
+ for (; aWES1.MoreStartElements(); aWES1.NextStartElement()) {
+ const TopoDS_Shape& aE=aWES1.StartElement();
+ aWES.AddStartElement(aE);
+ }
+ }
+ //--
+ /*