Hi, I was having a bit of trouble with lsystem1.py from the lsystem library in shoebot + made a fix. It seemed like zero getting passed in as a time parameter was confusing things, so I put in some explicit checks for None. If this makes sense I'd like it incorperated as we want all our changes to make it back upstream to nodebox ideally. --- a/lib/lsystem/__init__.py Thu Sep 16 00:30:16 2010 +0000 +++ b/lib/lsystem/__init__.py Thu Sep 23 04:16:26 2010 +0100 @@ -166,11 +166,11 @@ """ angle = self.angle - if time and ease: + if time is not None and ease: angle = min(self.angle, self.angle * time / ease) self._timed = True - if not time: + if time is None: self._timed = False time = maxint
LSystem Fix
Posted by Stu on Sep 23, 2010Hi,
I was having a bit of trouble with lsystem1.py from the lsystem library in shoebot + made a fix.
It seemed like zero getting passed in as a time parameter was confusing things, so I put in some explicit checks for None.
If this makes sense I'd like it incorperated as we want all our changes to make it back upstream to nodebox ideally.
--- a/lib/lsystem/__init__.py Thu Sep 16 00:30:16 2010 +0000
+++ b/lib/lsystem/__init__.py Thu Sep 23 04:16:26 2010 +0100
@@ -166,11 +166,11 @@
"""
angle = self.angle
- if time and ease:
+ if time is not None and ease:
angle = min(self.angle, self.angle * time / ease)
self._timed = True
- if not time:
+ if time is None:
self._timed = False
time = maxint