Recursion problem with Groovy

Help
Pete
2015-08-17
2015-08-21
  • Pete

    Pete - 2015-08-17

    Hi!

    Could somebody explain me this? I have the exact same scripted object as Beanshell and Groovy. It is a recursive structure, that grows when you pull the time slider forward (be careful it gets heavy very fast!),

    Why is groovy reading it in a different way? -- It looks as if it would be getting confused with on what level some of the variables are. In the "Cactus" object a very similar structure works just fine.

    Strangely enough, the first generation of branches (Case "R") happens correctly with the for-loop. At around the 3rd generation problems appear (Case B). I have tried a number of things with it, but I can not get it to work right. The lead branch is created correctly, but there is some confusion with the side branches. If I comment one of them two out, the remaining one works fine.

    Also the Groovy version jams java, when I try to render. It goes Processing Scene and then CPU drops to 0%.

    In the picture: The BSh on the left, Groovy on the right.

    EDIT: Reposted the .aoi-file. Now there is the same variable (nDist) calculated twice. That is basically unnecessary, but it has an effect on the result of the Groovy-version.

     
    Last edit: Pete 2015-08-18
  • Peter Eastman

    Peter Eastman - 2015-08-21

    Something really strange is going on here. I'm investigating...

    Peter

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks