]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2116 Crash when Splitting a circle crossing external segments
authornds <nds@opencascade.com>
Mon, 10 Apr 2017 09:33:11 +0000 (12:33 +0300)
committernds <nds@opencascade.com>
Mon, 10 Apr 2017 09:33:26 +0000 (12:33 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp

index 1df2c7f8745f37b64881a809f7885f922452a77e..e1a47c77c1cb935509f9744de02fdac79677dc9b 100644 (file)
@@ -698,7 +698,11 @@ void GeomAlgoAPI_ShapeTools::splitShape(const std::shared_ptr<GeomAPI_Shape>& th
                                       const GeomAlgoAPI_ShapeTools::PointToRefsMap& thePointsInfo,
                                       std::set<std::shared_ptr<GeomAPI_Shape> >& theShapes)
 {
-  // General Fuse to split edge by vertices
+  // to split shape at least one point should be presented in the points container
+  if (thePointsInfo.empty())
+    return;
+
+    // General Fuse to split edge by vertices
   BOPAlgo_Builder aBOP;
   TopoDS_Edge aBaseEdge = theBaseShape->impl<TopoDS_Edge>();
   // Rebuild closed edge to place vertex to one of split points.