Automatic selection of cork parts