distToShape: return solution support shape type and index