From b346c83f4b5c241ac90083322f5796d79c27504c Mon Sep 17 00:00:00 2001 From: David Vierra Date: Tue, 16 Nov 2010 00:26:59 -1000 Subject: [PATCH] None means the requested box was outside the bounds --- mclevel.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mclevel.py b/mclevel.py index 9f1b99a..62881c9 100644 --- a/mclevel.py +++ b/mclevel.py @@ -997,7 +997,9 @@ class MCLevel(object): return box, (destX, destY, destZ) def extractSchematic(self, box): - box, destPoint = self.adjustExtractionParameters(box); + p = self.adjustExtractionParameters(box); + if p is None: return + box, destPoint = p tempSchematic = MCSchematic(shape=box.size) tempSchematic.materials = self.materials @@ -1006,7 +1008,10 @@ class MCLevel(object): return tempSchematic def extractZipSchematic(self, box, zipfilename): - box, destPoint = self.adjustExtractionParameters(box); + p = self.adjustExtractionParameters(box); + if p is None: return + box, destPoint = p + destPoint = (0,0,0) filename = tempfile.mktemp("schematic")