summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xshare/extensions/gcodetools.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/extensions/gcodetools.py b/share/extensions/gcodetools.py
index 1f0001c3a..be471136e 100755
--- a/share/extensions/gcodetools.py
+++ b/share/extensions/gcodetools.py
@@ -78,7 +78,6 @@ import copy
import sys
import time
import cmath
-import numpy
import codecs
import random
# local library
@@ -93,6 +92,12 @@ import bezmisc
if "errormsg" not in dir(inkex):
inkex.errormsg = lambda msg: sys.stderr.write((unicode(msg) + "\n").encode("UTF-8"))
+try:
+ import numpy
+except:
+ inkex.errormsg(_("Failed to import the numpy modules. These modules are required by this extension. Please install them and try again. On a Debian-like system this can be done with the command, sudo apt-get install python-numpy."))
+ exit()
+
def bezierslopeatt(((bx0,by0),(bx1,by1),(bx2,by2),(bx3,by3)),t):
ax,ay,bx,by,cx,cy,x0,y0=bezmisc.bezierparameterize(((bx0,by0),(bx1,by1),(bx2,by2),(bx3,by3)))