Connect components with straight lines