Loops and recursions in parametric modelling

I have come across this problem already twice in this month and by looking at this fascinating post on Andrew Heumann’s blog (and over 10,000 downloads of the GH plug-in Hoopsnake, for which I am sorry if I accidentally misinterpret in this post) it seems to make quite an interesting case.

What are loops?

It happens when you are trying to use some function or component, for example array. When you are taking data from it and establish relations with other functions or components and bring this data back to it, then you have a loop. A loop of data, which most of programs can’t apperenty work out.

At this point I should mention again, that if Hoopsnake actually did not have in purpose to deal with this issue, but just create “repetitions” of components let me know in comments. Anyway I am not going to write vastly about it anyway, because the best solution seems to lay somewhere else.

And namely, what I have firstly found out on Andrew’s blog, the best solution is instead of bringing data to the previosuly used function, simply copy it as a new one. Data can so flow and the loop is smoothly “omitted”.

Some examples

The first time it happened to me was when trying to trim a hexagonal pattern in Grasshopper, by using some of its information from and back to it.

1

2

The second time was when creating a set of stairs controlled by its slope’s angle in Revit Family Editor. However in the latter example the error was at least more evident, while all the parameters and all the formulas were arranged in a schedule and the already used ones were grayed out.

34

Great thing to learn and personally, so far the issue, which has brought the closest, as I have ever got before, to technical programming problems. I regret not describing both situations in GH and Revit closer, especially, becasue I have had already the images prepared, but.. well, time constraints are slowly bringing me into a loop.

Advertisements