fix calculation of distance from plane to origin

fix calculation of distance from plane to origin
Merge pull request #1593 from sxop/next

fix calculation of distance from plane to origin