@lassoan you are correct in that the formula is correct for internal vertices. Way back in 2002 I think that we did consider points on an edge but even averaging yielded strange values so nothing more was done. The formula is correct for closed orientable surfaces. For edges and holes, clipping would be the best approach after calculating the curvatures.