]> git.pld-linux.org Git - packages/freecad.git/blob - freecad-0.14-DraftSnap.patch
- we have update_icon_cache macro
[packages/freecad.git] / freecad-0.14-DraftSnap.patch
1 From 328bdcf6363f1107447858c2dd939ecae1005f47 Mon Sep 17 00:00:00 2001
2 From: Yorik van Havre <yorik@uncreated.net>
3 Date: Thu, 18 Sep 2014 19:39:37 -0300
4 Subject: [PATCH] Draft: small fix in trackers - fixes #1757
5
6 ---
7  src/Mod/Draft/DraftSnap.py | 5 ++++-
8  1 file changed, 4 insertions(+), 1 deletion(-)
9
10 diff --git a/src/Mod/Draft/DraftSnap.py b/src/Mod/Draft/DraftSnap.py
11 index ac57d43..af53881 100644
12 --- a/src/Mod/Draft/DraftSnap.py
13 +++ b/src/Mod/Draft/DraftSnap.py
14 @@ -575,7 +575,10 @@ def snapToPolar(self,point,last):
15                              vecs.extend([v,v.negative()])
16                  for v in vecs:
17                      if not DraftVecUtils.isNull(v):
18 -                        de = Part.Line(last,last.add(v)).toShape()  
19 +                        try:
20 +                            de = Part.Line(last,last.add(v)).toShape()
21 +                        except:
22 +                            return point,None
23                          np = self.getPerpendicular(de,point)
24                          if ((self.radius == 0) and (point.sub(last).getAngle(v) < 0.087)) \
25                          or ((np.sub(point)).Length < self.radius):
This page took 0.043862 seconds and 3 git commands to generate.