X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_SketchBuilder.cpp;h=8359b32448f7c4364eba15947190893696733dbb;hb=580f1752efd9d3e8c2890c4016b04dafd639bab7;hp=7e64d882cef1cdd93fd151e80639618ac2e2c976;hpb=5297856d2148995c4dcb0561f895a6a22db7086b;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index 7e64d882c..8359b3244 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -380,13 +380,24 @@ void GeomAlgoAPI_SketchBuilder::createFaces(const std::shared_ptr& const std::shared_ptr& theWire, std::list >& theResultFaces) { - std::shared_ptr aWire = std::dynamic_pointer_cast(theWire); - if(!aWire) - return; - // Filter wires, return only faces. std::list > aFilteredWires; - createFaces(theOrigin, theDirX, theNorm, - aWire->getEdges(), theResultFaces, aFilteredWires); + std::shared_ptr aWire = + std::dynamic_pointer_cast(theWire); + if(aWire) { + // Filter wires, return only faces. + createFaces(theOrigin, theDirX, theNorm, + aWire->getEdges(), theResultFaces, aFilteredWires); + + return; + } else { // it may be only one circle + std::shared_ptr anEdge = std::dynamic_pointer_cast(theWire); + if (anEdge) { + std::list > aList; + aList.push_back(anEdge); + createFaces(theOrigin, theDirX, theNorm, + aList, theResultFaces, aFilteredWires); + } + } }