apply heightCurvature3D patch by timothy langlois