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 a98fed7165daf4ef8b7f5a90ea6daac62bbbd181..feee863dbf9fbc93b13c7d92c54efb292532acf7 100755 (executable)
@@ -41,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
+