bellockk / alphashape

Toolbox for constructing alpha shapes.
MIT License
252 stars 28 forks source link

Real Warnings instead of logger warnings #24

Closed thiesben closed 1 year ago

thiesben commented 3 years ago

Description

I believe there is a strong use case for the warnings output by logger to be instead created by warnings. In this case, one can fetch cases where the algorithm would not converge and, for example, try again with known lower / upper parameters. This is helpful, for example, when one is working with a lot of different geometries for which one would like to get the concave hull.

The same goes for the warning "'Singular matrix. Likely caused by all points lying in an N-1 space." If this warning can be fetched, one can possibly stop the execution of the optimizealpha algorithm right away and set, e.g., alpha=0 directly.

I benefitted from changing these details in the code, so I am posting this as a suggestion. Can also do it myself.

bellockk commented 2 years ago

If you can post a pull request this sounds like a good change.

thiesben commented 2 years ago

Bertskyˈs pull request looks good to me. I suggest closing this issue after merging the pull request.