List remap according to condition between two following indexes in the list

 

I am trying to make parametric random 1D grid with basic parameters like length, number of cells, minimal and maximal cell length. I managed to create a grid satisfying length and number of cells and got a list with actual coordinates of points on the 1 dimensional grid.

What I cant figure out how to implement two parameters for minimal and maximal cell length. I need a way to remap the list so that difference of every two followings values is within a condition for minimal or maximal cell length. It looks like iterative process. Do you have any idea how to get from this list a new list satisfying those conditions ? Thank you very much

Ivan,

You don’t show your graph, but I’m guessing you’re generating a series of random cell sizes. Why don’t you generate those random numbers so they meet your criteria for min and max size?

Cheers,

David

It cant be done in one step I found out after consultations it is way too complicated for me to do. It should be script in python iterating and finding solution. You can easily do random numbers satisfying length and number of cells but implementing parameters controlling maximum and minimal cell length is not just so.

Something similar:

http://dynamobim.org/forums/topic/processing-points-in-a-list-into-a-new-list/#post-16562

As a morning challenge, I decided to do this just with the out of the box nodes. The result isn’t pretty but it works. I agree - it would be easier if you use DS code or python.