Generate connection between two paths