OpenEndedGroup / Field

A development environment for art
201 stars 22 forks source link

makePDF throws an error testing bounds #23

Closed highfellow closed 11 years ago

highfellow commented 11 years ago

If you try to export some FLine geometry to PDF, makePDF throws an error at line 1004 in Contents/Python/TweakTools.py where it's testing whether the bounds were specified as an FLine. It's awkward to reproduce the exact error message right now, but what I remember is it's because FLine is undefined in that context.

The workaround I'm using is simply to comment out lines 1004 and 1005. Having done this, it works nicely (and looks good - thanks!)

The git diff is:

andy@monkey:/usr/local/src/Field/Contents/python$ git diff TweakTools.py
diff --git a/Contents/python/TweakTools.py b/Contents/python/TweakTools.py
index 5c96613..4a16d3e 100644
--- a/Contents/python/TweakTools.py
+++ b/Contents/python/TweakTools.py
@@ -1001,8 +1001,8 @@ def makePDF(geometry = None, bounds = None, background = None, scale=1, fil
        if (isinstance(bounds, PLine)):
                bounds = bounds.bounds()

-       if (isinstance(bounds, FLine)):
-               bounds = bounds.bounds2()
+       #if (isinstance(bounds, FLine)):
+       #       bounds = bounds.bounds2()

        pdfContext.paperWidth=bounds.w*scale
highfellow commented 11 years ago

I'm using ubuntu linux 64 bit by the way.

marcdownie commented 11 years ago

Fixed locally (thanks), will be fixed with the next push to the public repository.

On Tue, Feb 5, 2013 at 9:04 AM, Andrew Baxter notifications@github.comwrote:

I'm using ubuntu linux 64 bit by the way.

— Reply to this email directly or view it on GitHubhttps://github.com/OpenEndedGroup/Field/issues/23#issuecomment-13133094.