From e72ec8c7799926fd0ffe7cd2baf471a6026e1dad Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 30 Jul 2014 18:47:52 +0400 Subject: [PATCH] Temporary workaround for crash fix (some unknown memory problem) --- src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index c5c8588d4..cba0974a5 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -157,6 +157,8 @@ void GeomAlgoAPI_SketchBuilder::createFaces( gp_Dir aNextDir; while (aMapVE.Extent() > 0) { + if (aCurVertex.IsNull()) + return; findNextVertex(aCurVertex, aMapVE, aCurDir, aCurNorm, aNextVertex, aBindingEdge, aNextDir); aCurNorm = aNorm; @@ -210,7 +212,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces( if (!aPatch.IsNull()) { boost::shared_ptr aFace(new GeomAPI_Shape); - aFace->setImpl(new TopoDS_Shape(aPatch)); + aFace->setImpl(new TopoDS_Face(aPatch)); theResultFaces.push_back(aFace); } // push the edges used in the loop to the map @@ -344,6 +346,8 @@ void GeomAlgoAPI_SketchBuilder::fixIntersections( for (++anIter2; anIter2 != theFaces.end(); anIter2++) { const TopoDS_Face& aF1 = (*anIter1)->impl(); + if (aF1.ShapeType() != TopAbs_FACE) // TODO: MPV - this workaround must be fixed later by AZV, now it just removes crash + continue; TopExp_Explorer aVert2((*anIter2)->impl(), TopAbs_VERTEX); for ( ; aVert2.More(); aVert2.Next()) { -- 2.39.2