I am trying to setup a workflow where i based on intersections between walls and rafters, automatically place roof anchors based on the points collected.
But when getting to the point of creating the part which on the basis of an maximum distance input, ensures that families aren’t placed at every rafter, but with a maximum distance between the elements - i really start to struggle.
I have identified the start point, and the distance from this point, to the remaining points - i however cant really grasp the logic of how to filter the points from here.
Example:
First point at 0,0,0 and a maximum allowed distance of 3000.
Following rafters placed at:
1: 0,0,1000 (no anchors needed)
2: 0,0,2000 (no anchors needed)
3: 0,0,3000 (anchors needed!)
4: 0,0,4000 (no anchors needed)
5: 0,0,5000 (no anchors needed)
6: 0,0,5800 (anchors needed!)
7: 0,0,7000 (no anchors needed)
8: 0,0,8000 (anchors needed!)
9: 0,0,9000 (no anchors needed)
Have any of you had any luck in building a similar kind of logic?
you have to solve this by iteration or recursion.I think this will be a bit tricky with oob nodes. I have written a for loop in python that solve this by iteration and explained the logic behind, hope it make sense.maxdistancetopoint.dyn (13.9 KB)
Have just ran the python code - is there an easy way of looping the filtering on a list with multiple subslist, i seems that it doesnt expect to meet a list of lists :). maxdistancetopoint.dyn
I have never gotten round to python - but i think i need to spend some time on getting my python game up to speed
Is there any way to keep the list structure of the input within the python code?
I have made a brute workaround, but it would be much neater if it was easy to incorporate in the python code.
my solution will not work on an arbitrarily nested list but i have tweeked it so it works for a list of lists(2 levels) but it will not work for a flat list anymore. maxdistancetopointfrom list of lists.dyn (17.4 KB)