Simulation and shape synthesis of kinematic pairs via small-scale interference detection