added planarity function with distance to plane

not working fully with 46.0.poly though