ider and a list item component to select a particular brep A or B or C, without selecting a particular breq inside each of them?
It seems the merge function will merge all the breqs inside each of the breps into one flattened list ...…
by its own tangent vector on the curve... and this happens to the last item. Here's the algorithm:
B0 ----> B1
B1 ----> B2
B2 ----> B3
B3 ----> B4
...
…
curve B
B1--------------------------B0
You define distances:
|A0 B0|
|A0 B1|
|A1 B0|
|A1 B1|
And find the smallest one. Then, based on the number of the shortest distance:
Flip A, Leave B
Flip A, Flip B
Leave A, Leave B
Leave A, Flip B
A more advanced metric would be to create all 4 blends, then pick the one that is shortest. Maybe that works better for what you want, maybe not.
--
David Rutten
david@mcneel.com…
Added by David Rutten at 8:09am on February 11, 2014
. The rules to dispatch the lines are the next:
I start with a list that alternate true/false; like that: true, false, true, false.
If the angles between those lines are greater than 89° I want to inverse the next part of the list:
True, False, True, False, True, False,...
become
True, False, [>89°] False, True, False, True, [>89°] True, False,...
I managed to create a true false list, to check for the greater than 89° angle, to separate the lines relatively to the angles, but I don't know how to inverse part of the list at certain index.
(In the picture, I have written 90° but it should be 89°, I check for greater than 89° and not equal to 90° because in the real rhino model, the lines won't be exactly orthogonal)
If you have another idea to to reach the same result, it's also okay, I tried to find rules to solve the problems, but I may have overlooked other solutions !
And if there is some part of the patch that are correct but there is easier solution, I would love to learn as I am still new to grasshopper.
Thanks for taking the time to read. :)
…
exact formula is inside /lib/skybright.cal if this can help you to find the name.
{ RCSid: $Id$ } { Sky brightness function for sunny and cloudy skies.
Additional arguments required for calculation of skybright:
A1 - 1 for CIE clear, 2 for CIE overcast, 3 for uniform, 4 for CIE intermediate A2 - zenith brightness A3 - ground plane brightness A4 - normalization factor based on sun direction A5,A6,A7 - sun direction }
cosgamma = Dx*A5 + Dy*A6 + Dz*A7;
gamma = Acos(cosgamma); { angle from sun to this point in sky }
zt = Acos(A7); { angle from zenith to sun }
eta = Acos(Dz); { angle from zenith to this point in sky }
wmean(a, x, b, y) : (a*x + b*y) / (a + b);
skybr = wmean((Dz+1.01)^10, select(A1, sunnysky, cloudysky, unifsky, intersky), (Dz+1.01)^-10, A3);
sunnysky = A2 * (.91 + 10*exp(-3*gamma) + .45*cosgamma*cosgamma) * if( Dz - .01, 1.0 - exp(-.32/Dz), 1.0) / A4;
cloudysky = A2 * (1 + 2*Dz)/3;
unifsky = A2;
intersky = A2 * ( (1.35*sin(5.631-3.59*eta)+3.12)*sin(4.396-2.6*zt) + 6.37 - eta ) / 2.326 * exp(gamma*-.563*((2.629-eta)*(1.562-zt)+.812)) / A4;
…