diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index da7b3971e5..b9972f1ff9 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -2535,13 +2535,18 @@ struct ShapeInfo{ std::list sortWires(const gp_Pnt &pstart, gp_Pnt &pend, double min_dist, double max_dist, gp_Pnt *pentry) { + std::list wires; + if(myWires.empty() || - pstart.SquareDistance(myStartPt)>Precision::SquareConfusion()) + pstart.SquareDistance(myStartPt)>Precision::SquareConfusion()) + { nearest(pstart); + if(myWires.empty()) + return wires; + } if(pentry) *pentry = myBestPt; - std::list wires; if(min_dist < 0.01) min_dist = 0.01; while(true) {