Nodebundle for playing with nodes

 From:  Karsten (KMRQUS)
7777.1723 In reply to 7777.1721 
Hello James,

busy job, mother is gone - weather is good, beer is cold and the liver grows with its tasks - that's life.

Nevertheless - Loop.
The Loop implementation is very basic and limited to one loop, because there is only one array for storing the feedback data. You can find the declaration in basicFunctions.js in the first lines for numbers points and objects.
With this arrays is the feedback realized so you don't have to wire back something in the canvas - by the way, it's also not possible like in GH.
How it works:
The LoopStart node takes the initial data to the initial connection- a numarray, points or objects - you can set it with the RMB. At the Trigger input you have to put a cycled quartz node that kicks the process again and again. In the first cycle LoopStart takes the initial data and put it to the output. You have to take now this data, do someting with it and give them to the LoopEnd. Loop End stores them in the mentioned array. In the following cycles loopStart checks if it is a first cycle or not - if not it takes the data from the array. It is possible to RESET the node by RMB. This would run now forever - so we need also a termination condition that stops the manipulation of your looped data. So you have evaluate something from your data - compare someting or get the number of object ... and feed the result in the Run input of the LoopEnd node. If you put in a 1 here, the data will be put back to the LoopStart otherwise not and the manipulation stops or better the manipulation cycle takes allway the same data.


I've took my old post to explain it on this example:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1382
Try GetInTouch.nod.
Here is the start object a small cone. LoopStart takes it and put it to the out. Then the cone is moved a little bit. With a intersection node I check if the objects create a clash. This is my termination criteria. So no Intersection - no Objects. I take the Length of the objectlist and check if it is 0, If yes the process starts again with the new position of the cone. If a clash is detected the process stops and with a tolerance of the movement I brought the cone in touch with the sphere.

I Hope you can do something with it - allways a pleasure to see your results!

Have a nice day
Karsten