Added segment to segment distance..Minor fixes in linear shapes