Function convertShapeToLinearElement

Converts a shape (rectangle, polygon, ellipse) to a linear element