git.iko.soy/typeable/nixpkgs
on master help sign in
cura: Fix breakage due to numpy change. (#16234)

Upstream bug report: https://github.com/daid/Cura/issues/1461

commit7102c3c0c4eea385f5f2d7b52dab37ba46216356 authorAmbroz Bizjak <ambrop7@gmail.com> dateWed 15 Jun 2016, 14:42 (10 years ago) parent3bbdfe5
2 files changed+14
pkgs/applications/misc/cura/default.nix+2 pkgs/applications/misc/cura/numpy-cast.patch+12
pkgs/applications/misc/cura/default.nix+2
@@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
3131
3232 configurePhase = "";
3333 buildPhase = "";
34+
35+ patches = [ ./numpy-cast.patch ];
3436
3537 installPhase = ''
3638 # Install Python code.
pkgs/applications/misc/cura/numpy-cast.patchnew file+12
@@ -0,0 +1,12 @@
1+diff -urN Cura-15.04.old/Cura/util/sliceEngine.py Cura-15.04/Cura/util/sliceEngine.py
2+--- Cura-15.04.old/Cura/util/sliceEngine.py 2016-05-07 20:34:17.305020334 +0200
3++++ Cura-15.04/Cura/util/sliceEngine.py 2016-05-07 20:40:02.993286467 +0200
4+@@ -343,7 +343,7 @@
5+ objMax[1] = max(oMax[1], objMax[1])
6+ if objMin is None:
7+ return
8+- pos += (objMin + objMax) / 2.0 * 1000
9++ pos = numpy.add( pos, (objMin + objMax) / 2.0 * 1000, out=pos, casting='unsafe')
10+ commandList += ['-s', 'posx=%d' % int(pos[0]), '-s', 'posy=%d' % int(pos[1])]
11+
12+ vertexTotal = [0] * 4