Orthogonalization of paths (polygones) with simplification