View Analysis_view distance and direction to a particular building facade

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