Add primitive to primitive distance functor