From a1c5b2a4bdb3cce9e2ed674c8001e7943e0a04ea Mon Sep 17 00:00:00 2001 From: easyw Date: Thu, 2 Nov 2017 10:24:25 +0100 Subject: [PATCH] avoid stop loading on coincident points reference at the forum: https://forum.freecadweb.org/viewtopic.php?f=3&t=25146&p=197699#p197607 --- src/Mod/Draft/importSVG.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index 4242cdc9b8..dbe755c4e4 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -625,10 +625,11 @@ class svgHandler(xml.sax.ContentHandler): currentvec = lastvec.add(Vector(0,-y,0)) else: currentvec = Vector(lastvec.x,-y,0) - seg = Part.LineSegment(lastvec,currentvec).toShape() - lastvec = currentvec - lastpole = None - path.append(seg) + if lastvec!=currentvec: + seg = Part.LineSegment(lastvec,currentvec).toShape() + lastvec = currentvec + lastpole = None + path.append(seg) elif (d == "A" or d == "a"): for rx,ry,xrotation, largeflag, sweepflag,x,y in \ zip(pointlist[0::7],pointlist[1::7],pointlist[2::7],pointlist[3::7],pointlist[4::7],pointlist[5::7],pointlist[6::7]):