View Analysis_view distance and direction to a particular building facade

Hi, community.
The new Ladybug tool 1.4.0 is awsome. I have been running tests to study the visibility between building facades and street points with LB&HB. With the component of “VisibilityPercent”, it’s able to find out how many points are visible to the building facades. But when a maximum view distance is given, how could I find out how many points are not visible within the given distance.


ViewAnalysis_Distance_Directions.gh (25.9 KB)
A few more questions can be found in the upload image or .gh file. Any idea about those things?
Best

This is a good question but it’s probably going to need an extra calculation. Essentially, you’ll have to first figure out the number of _view_points that are within a given distance of a particular grid point. Once you have that, it’s pretty easy. You’ll just have to edit this line of code inside the component:

Essentially, you’ll want to divide by the number of points within the distance rather than the vec_count (aka. the total number of points). You’ll also probably need something to catch the case that no points are within the max_dist_ since you’ll otherwise get a ZeroDivisionError.

If enough people here find this useful, maybe we can add something for this natively in the official component.

1 Like

Hi @chris,
i can find this useful. Handy.
-A.

Hi, Chris.
Thanks, that’s impressive. I am new to Grasshopper/Ladybug and still trying to figure out how those components work, what they can/cannot do. Also, I am not familiar with the programming/code thing, but I definitely have to try it out. The visibility analysis component is powerful and I believe it could be much better. There is a lot more that can be improved. Once I got something new, I’ll have you updated.
Thanks again.
Best

Ok I opened an issue for this on out GitHub:

Because this is a good issue for anyone interested in contributing to tackle and it isn’t pressing, I’d like to leave it there for a while to see if anyone else would like to implement it.

If it’s still not implemented after some time, I’ll add it.

2 Likes

@chris The gap is not filled yet. It’ll be great help for me if you could kindly fix this.
Thanks.