Making chains or chain links of special shape