Salome HOME
RNC: EDF 1618 Modified sketcher to allow creation of arcs of circle with the destinat...
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Builder.cxx
index 4c98d3600733f2e68d4917c7a5654543d7669b18..feee863dbf9fbc93b13c7d92c54efb292532acf7 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2008  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
@@ -19,7 +19,6 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-
 // File:        GEOMAlgo_Builder.cxx
 // Created:     
 // Author:      Peter KURNEV 
@@ -42,6 +41,7 @@
 
 #include <BRepLib.hxx>
 #include <NMTTools_PaveFiller.hxx>
+#include <GEOMAlgo_Tools.hxx>
 
 //=======================================================================
 //function : 
     AddShape1(aS);
   }
 }
-//=======================================================================
-//function : PostTreat
-//purpose  : 
-//=======================================================================
-  void GEOMAlgo_Builder::PostTreat()
-{
-  Standard_Integer aNbS;
-  TopoDS_Iterator aIt;
-  TopTools_ListOfShape aLS;
-  //
-  aIt.Initialize(myShape);
-  for (; aIt.More(); aIt.Next()) {
-    const TopoDS_Shape& aS=aIt.Value();
-    aLS.Append(aS);
-  }
-  aNbS=aLS.Extent();
-  if (aNbS==1) {
-    myShape=aLS.First();
-  }
-  
-  BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
-}
+
 //=======================================================================
 //function : AddShape1
 //purpose  : 
   PostTreat();
 }
 //
+static 
+  void CorrectWires(const TopoDS_Shape& aS);
+//
+//=======================================================================
+//function : PostTreat
+//purpose  : 
+//=======================================================================
+  void GEOMAlgo_Builder::PostTreat()
+{
+  Standard_Integer aNbS;
+  TopoDS_Iterator aIt;
+  TopTools_ListOfShape aLS;
+  //
+  aIt.Initialize(myShape);
+  for (; aIt.More(); aIt.Next()) {
+    const TopoDS_Shape& aS=aIt.Value();
+    aLS.Append(aS);
+  }
+  aNbS=aLS.Extent();
+  if (aNbS==1) {
+    myShape=aLS.First();
+  }
+  
+  BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
+  //
+  GEOMAlgo_Tools::CorrectWires(myShape);
+}
+//
 // myErrorStatus
 // 
 // 0  - Ok
 // 2  - PaveFiller is failed
 // 10 - No shapes to process
 // 30 - SolidBuilder failed
+