I have the following problem:
I have multiple 3D scanned treelogs and I want to arrange them on top of each other like a loghome wall.
The goal is to end up with a horizontal line at the top. So I have two lists of values, one with diameter on side A and one with the diameter of the treelog on side B. The two lists diameters should be added up and have the same height in the end. So I think I need to have a loop interchanging the diameter A and B of each tree until it`s lets say equal within 5percent tolerance. I would than orient the 3D scanned logs according to these values in 3D space.
I have a script to evalute the diameters of the logs and end up with diameter A and B. But don`t know exactly how to proceed from there.
How do i setup the loop? Or do I work with gates or?
My approach would be:
Mass Addition of two lists of values (a1;a2;a3…)(b1,b2,b3…) exchange a1 with b1,a2 with b2… until I have the two sums to be similar(within 2-5percent range).
I´m not an expert so I might be doing stuff completely wrong, sorry for that.
Help would be extremely appreciated
This is my script for finding the approximate diameters of the scanned treelogs (and later Orienting them with the help of bounding boxes). At the end I have two "fictional " diameter lists to work with.
OrientTreelog_withDiameter_2.gh (8.7 MB)