From b1741682a46d25b9b92f4d247138fc776dc4555a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Sat, 6 Jun 2015 21:14:54 +0000 Subject: [PATCH] fix intersect with empty normsubpaths (bug #62, thanks to Florent Hivert) git-svn-id: http://svn.code.sf.net/p/pyx/code/trunk/pyx@3659 a4f5e268-e194-4f32-bce1-d30804cbbcc5 --- CHANGES | 4 ++++ pyx/normpath.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 42398d1b..60b0dc46 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +0.15 (xxxx/xx/xx): + - normpath: + - fix intersect with empty normsubpaths (bug #62, thanks to Florent Hivert) + 0.14 (2015/04/30): - new svgwriter module: - complete SVG output diff --git a/pyx/normpath.py b/pyx/normpath.py index fd741029..5a716e1e 100644 --- a/pyx/normpath.py +++ b/pyx/normpath.py @@ -1316,6 +1316,9 @@ class normsubpath: if len(params) < 2: raise ValueError("at least two parameters needed in segments") + if not self.normsubpathitems: + assert not self.closed # "empty" normsubpath cannot be closed + return [self]*(len(params)-1) result = [normsubpath(epsilon=self.epsilon)] -- 2.11.4.GIT