diff --git a/src/Mod/TechDraw/App/DrawProjectSplit.cpp b/src/Mod/TechDraw/App/DrawProjectSplit.cpp index f5276b2cfb..0b473df30e 100644 --- a/src/Mod/TechDraw/App/DrawProjectSplit.cpp +++ b/src/Mod/TechDraw/App/DrawProjectSplit.cpp @@ -479,7 +479,7 @@ std::string edgeSortItem::dump(void) /*static*/bool edgeSortItem::edgeLess(const edgeSortItem& e1, const edgeSortItem& e2) { bool result = false; - if (e1.start != e2.start) { + if ((e1.start - e2.start).Length() < Precision::Confusion()) { if ( DrawUtil::vectorLess(e1.start, e2.start)) { result = true; } @@ -501,8 +501,11 @@ std::string edgeSortItem::dump(void) /*static*/bool edgeSortItem::edgeEqual(const edgeSortItem& e1, const edgeSortItem& e2) { bool result = false; - if ( (e1.start == e2.start) && - (e1.end == e2.end) && + double startDif = (e1.start - e2.start).Length(); + double endDif = (e1.end - e2.end).Length(); + + if ( (startDif < Precision::Confusion()) && + (endDif < Precision::Confusion()) && (DrawUtil::fpCompare(e1.startAngle,e2.startAngle)) && (DrawUtil::fpCompare(e1.endAngle,e2.endAngle)) ) { result = true; diff --git a/src/Mod/TechDraw/App/DrawUtil.cpp b/src/Mod/TechDraw/App/DrawUtil.cpp index f8a3e8952c..685824bbae 100644 --- a/src/Mod/TechDraw/App/DrawUtil.cpp +++ b/src/Mod/TechDraw/App/DrawUtil.cpp @@ -281,7 +281,7 @@ std::string DrawUtil::formatVector(const Base::Vector3d& v) bool DrawUtil::vectorLess(const Base::Vector3d& v1, const Base::Vector3d& v2) { bool result = false; - if (v1 != v2) { + if ((v1 - v2).Length() > Precision::Confusion()) { //ie v1 != v2 if (!DrawUtil::fpCompare(v1.x,v2.x)) { result = v1.x < v2.x; } else if (!DrawUtil::fpCompare(v1.y,v2.y)) {