Shaping and joining components with different densities or hardness