Fixing periodic boundary conditions distance artefacts

Maybe this post can help you

Kind regards