0023785: Crash on make face from wire
[occt.git] / src / BRepLib / BRepLib_MakeFace.cxx
index 9168f68..0366b21 100755 (executable)
@@ -254,7 +254,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W,
 
 {
   // Find a surface through the wire
-  BRepLib_FindSurface FS(W, -1, OnlyPlane, /*OnlyClosed=*/Standard_True);
+  BRepLib_FindSurface FS(W, -1, OnlyPlane, Standard_True);
   if (!FS.Found()) {
     myError = BRepLib_NotPlanar;
     return;
@@ -268,9 +268,11 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W,
 
   B.MakeFace(TopoDS::Face(myShape),FS.Surface(),FS.Location(),tol);
   Add(W);
-
+  //
   BRepLib::UpdateTolerances(myShape);
-
+  //
+  BRepLib::SameParameter(myShape, tol, Standard_True);
+  //
   CheckInside();
 }