Salome HOME
Porting to OCCT development version: Standard_PI -> M_PI
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Builder_1.cxx
index 5698a5869c426bd30f6b29b473c5c923d0ff42e8..5028b7699f5d7663a76795994f2c85f852bbbb40 100755 (executable)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:        GEOMAlgo_Builder_1.cxx
 // Created:     
 // Author:      Peter KURNEV 
@@ -111,11 +112,11 @@ static
   const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
   NMTTools_PaveFiller* pPF=myPaveFiller;
   const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool();
-  NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool();
+/*  NMTTools_CommonBlockPool& aCBP=*/pPF->ChangeCommonBlockPool();
   IntTools_Context& aCtx=pPF->ChangeContext();
   //
   Standard_Boolean bToReverse;
-  Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB;
+  Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB;
   TColStd_ListIteratorOfListOfInteger aItLB;
   TColStd_ListOfInteger aLB;
   TopoDS_Edge aEE, aESpR;
@@ -149,16 +150,17 @@ static
       nSp=aPB.Edge();
       const TopoDS_Shape& aSp=aDS.Shape(nSp);
       //
-      //modified by NIZNHY-PKV Fri Nov 30 10:40:36 2007 f
-      //const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB);
       const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB);
-      //modified by NIZNHY-PKV Fri Nov 30 10:40:48 2007t
+      //modified by NIZNHY-PKV Wed Oct 27 11:19:30 2010f
+      aNbLB=aLB.Extent();
+      if (aIsCB && aNbLB<2) {
+       aIsCB=0;
+      }
+      //modified by NIZNHY-PKV Wed Oct 27 11:19:34 2010t
+      //
       nSpR=aPBR.Edge();
       const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
-      //modified by NIZNHY-PKV Fri Nov 30 10:41:39 2007f
-      //if (aSpR.IsSame(aSp) && aSpR.IsSame(aE)) {
       if (aSpR.IsSame(aSp) && aSpR.IsSame(aE) && !aIsCB) {
-        //modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t
         continue;
       }
       //
@@ -182,10 +184,7 @@ static
       aIt.Initialize(aLPB);
       for (; aIt.More(); aIt.Next()) {
         const BOPTools_PaveBlock& aPB=aIt.Value();
-        //modified by NIZNHY-PKV Fri Nov 30 10:42:15 2007f
-        //const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB);
         const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB);
-        //modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t
         nSpR=aPBR.Edge();
         const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
         //
@@ -202,7 +201,6 @@ static
           const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
           mySameDomainShapes.Add(aSpx ,aSpR);
         }
-        //
       }
     }
     //