When designing PcB with press-fitted components, the geometric dimensions of positioning holes and board edges should be accurate. According to an exact edge, find the component anchor points on the X axis and Y axis. According to the geometric size, shape, direction, number of feet and other conditions of the component, make a modeling mold and enter the programming installation. If the other part has a height after pressing, choose a piece of soft rubber as the inner cushion mold at this height. Press it once, and then manually put another piece.
If it is an iron metal piece, a weak magnet can be used as the fixing condition, or a rubber pad film can be combined as the fixing condition.