bernhardmgruber / bpa

An exemplary implementation of the Ball Pivoting Algorithm (BPA) for surface reconstruction from oriented point clouds
Boost Software License 1.0
33 stars 6 forks source link

Guard against colinear seed points #8

Open debk1 opened 1 year ago

debk1 commented 1 year ago

I've found this code very useful -- thank you. Surface reconstruction is out of my area of expertise so this comment might be invalid... I have found the need to guard against colinear points in findSeedTriangle. Otherwise it can return a seed triangle with normal()=nan

bernhardmgruber commented 1 year ago

Hi! Thank you for reaching out! I am glad you found it useful!

This implementation is intentionally kept simple so I am sure there are lots of quality bugs like the one you described. If I find some time, I can implement a quick fix, like enforcing a minimum for all angles in the seed triangle, or a minimum area, etc. Feel free to also propose a PR!