A new algorithm for the automatic assembly of products encom