Make KindOfShape() work correctly in cases, when substrate surface is cone and contour-wire is arbitrary (tested with a wire, composed of lines and 2-order curves).