[freecad] Patch PythonSnap, fixes BZ#1143814.

Richard Shaw hobbes1069 at fedoraproject.org
Fri Sep 19 01:03:27 UTC 2014


commit 1e43ba14f1015769af4d92e2d533276533b86d42
Author: Richard M. Shaw <hobbes1069 at gmail.com>
Date:   Thu Sep 18 20:03:26 2014 -0500

    Patch PythonSnap, fixes BZ#1143814.

 freecad-0.14-DraftSnap.patch |   25 +++++++++++++++++++++++++
 freecad.spec                 |   25 ++++++++++++++++---------
 2 files changed, 41 insertions(+), 9 deletions(-)
---
diff --git a/freecad-0.14-DraftSnap.patch b/freecad-0.14-DraftSnap.patch
new file mode 100644
index 0000000..6250326
--- /dev/null
+++ b/freecad-0.14-DraftSnap.patch
@@ -0,0 +1,25 @@
+From 328bdcf6363f1107447858c2dd939ecae1005f47 Mon Sep 17 00:00:00 2001
+From: Yorik van Havre <yorik at uncreated.net>
+Date: Thu, 18 Sep 2014 19:39:37 -0300
+Subject: [PATCH] Draft: small fix in trackers - fixes #1757
+
+---
+ src/Mod/Draft/DraftSnap.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/Mod/Draft/DraftSnap.py b/src/Mod/Draft/DraftSnap.py
+index ac57d43..af53881 100644
+--- a/src/Mod/Draft/DraftSnap.py
++++ b/src/Mod/Draft/DraftSnap.py
+@@ -575,7 +575,10 @@ def snapToPolar(self,point,last):
+                             vecs.extend([v,v.negative()])
+                 for v in vecs:
+                     if not DraftVecUtils.isNull(v):
+-                        de = Part.Line(last,last.add(v)).toShape()  
++                        try:
++                            de = Part.Line(last,last.add(v)).toShape()
++                        except Part.OCCError:
++                            return point,None
+                         np = self.getPerpendicular(de,point)
+                         if ((self.radius == 0) and (point.sub(last).getAngle(v) < 0.087)) \
+                         or ((np.sub(point)).Length < self.radius):
diff --git a/freecad.spec b/freecad.spec
index aeed30b..2257a69 100644
--- a/freecad.spec
+++ b/freecad.spec
@@ -28,7 +28,7 @@
 
 Name:           freecad
 Version:        0.14
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A general purpose 3D CAD modeler
 Group:          Applications/Engineering
 
@@ -38,9 +38,12 @@ Source0:        http://downloads.sourceforge.net/free-cad/%{name}-%{version}.%{r
 Source101:      freecad.desktop
 Source102:      freecad.1
 
-Patch0:         freecad-3rdParty.patch
-Patch1:         freecad-0.14-Xlib_h.patch
-Patch2:         freecad-0.14-smesh.patch
+Patch0:         freecad-0.14-fixes.patch
+Patch1:         freecad-3rdParty.patch
+Patch2:         freecad-0.14-Xlib_h.patch
+Patch3:         freecad-0.14-smesh.patch
+# http://www.freecadweb.org/tracker/view.php?id=1757
+Patch4:         freecad-0.14-DraftSnap.patch
 
 
 # Utilities
@@ -105,7 +108,6 @@ Obsoletes:      %{name}-doc < 0.13-5
 # python-pivy does not build on EPEL 6 ppc64.
 Requires:       python-pivy
 %endif
-#Requires:       PyQt4
 Requires:       hicolor-icon-theme
 Requires:       python-matplotlib
 Requires:       python-collada
@@ -144,13 +146,15 @@ Data files for FreeCAD
 
 %prep
 %setup -q -n freecad-%{version}.%{rev}
-%patch0 -p1 -b .3rdparty
+#patch0 -p1
+%patch1 -p1 -b .3rdparty
 # Remove bundled pycxx if we're not using it
 %if ! %{bundled_pycxx}
 rm -rf src/CXX
 %endif
-%patch1 -p1 -b .Xlib_h
-%patch2 -p1 -b .smesh
+%patch2 -p1 -b .Xlib_h
+%patch3 -p1 -b .smesh
+%patch4 -p1 -b .draftsnap
 
 %if ! %{bundled_zipios}
 rm -rf src/zipios++
@@ -298,10 +302,13 @@ fi
 
 
 %changelog
+* Thu Sep 18 2014 Richard Shaw <hobbes1069 at gmail.com> - 0.14-3
+- Patch PythonSnap, fixes BZ#1143814.
+
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.14-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
-* Mon Aug  4 2014 Richard Shaw <hobbes1069 at gmail.com> - 0.14-2
+* Mon Aug  8 2014 Richard Shaw <hobbes1069 at gmail.com> - 0.14-2
 - Add python-pyside as requirement as it is not currently being pulled in as a
   automatic dependency by rpmbuild.
 


More information about the scm-commits mailing list