polygon: convert inputset to segment blocks