# C-value for Sightline analysis (bowlbuilder)

Hi all,

I am currently working on my master thesis on football stadiums. I am trying to calculate the C-value from a data tree of points. I am trying to utilize a component of “Bowlbuilder” (https://www.food4rhino.com/app/bowlbuilder#comment-31235) which needs as inputs a touchline (polyline curve) and a list of points (tree or flatten list). It seems to work correctly, except for the corner area. Here, the value calculated for few points is not correct (see image).

I think it must be a problem of the input list, since the number of seats per row change in the corner areas (So, the tree branches have a different length) I was thinking of trimming the list to maintain a constant number of points in every list, but it seems tricky with a complex tree such as this one. Do you have any suggestions?

_Ultimo.gh (2.2 MB)

Hi Alessandro,

BowlBuilder works with a datatree structure such that each branch respresents 1 row (in ascending order); the items within each branch represent ALL view points of this row. I.e., the “eyes” output is two-dimensional.

Your datatree structure is much more complex; it is 4-dimensional (the branch indices consist of 3 numbers e.g. {3;4;2}). It is not obvious to me which logic you used to build this datatree, since as I iterate through these branches it looks like you have grouped the 1st and 2nd tier.

I have solved this by rewriting the datatree structure of your points from scratch in Python. In case you don’t already know this, you can double-click the Python component to view my code.

_Ultimo.gh (2.3 MB)
Let me know if this helps.

On another note, I HIGHLY recommend simplifying your script. Congrats on getting this far but you have insane amounts of repetition in your definition, making it really difficult to wrap ones head around it. I suggest working more with clusters, datatree logic or even custom components if you can. You have done a great job creating those isles etc - if it were better parameterised I could incorporate your workflow into the toolset.

3 Likes

Ehi Max!

It works!! It works perfectly! I knew the problem was in the data tree.
The data tree is designed in order to contain the eye points of the spectators per sector (Branch 1 = sector 1 and index 1-10 = row 1-10. Moving to Branch 2 will then mean to restart from row 1 to 10 for the second sector and so on), but the order was indeed not correct for the C-value component.

Regarding the note. I am keeping the script so raw and “messy” so that it is easier for me to modify it if I have to, instead of re-opening every cluster. In the end, I will group everything in clusters and keep only the inputs and outputs as individual components. Also, I was not so skilled with grasshopper when I started and I already see many things that I could have done differently and in an easier way.

Again, Thank you so much for your time!