Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Visibility Analysis component to report the percent of points seen within max_dist_ #291

Open
chriswmackey opened this issue Mar 29, 2022 · 0 comments
Labels
enhancement wish New feature or request which is not critical to continued development at this point

Comments

@chriswmackey
Copy link
Member

chriswmackey commented Mar 29, 2022

This shouldn't be terribly difficult to add. It should be exposed an an option on the component inputs, though, since I think it doesn't feel like the desired default behavior.

To enable this, 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:

https://github.com/ladybug-tools/ladybug-grasshopper/blob/master/ladybug_grasshopper/src/LB%20Visibility%20Percent.py#L147

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.

More information is here:
https://discourse.ladybug.tools/t/view-analysis-view-distance-and-direction-to-a-particular-building-facade/17778/2

@chriswmackey chriswmackey added enhancement wish New feature or request which is not critical to continued development at this point labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement wish New feature or request which is not critical to continued development at this point
Projects
None yet
Development

No branches or pull requests

1 participant