yes and no.
technically it might be within the rules.
but let's not forget that this is a gentleman sport, where there is so much more than written rules.
would NK do the same vs Federer? I doubt it.
If he has a problem with Nadal, he could defeat him on the tennis court, invite for a box sparring, or a Mio of other things, but not trying to hit him with a tennis ball.
If I am not mistaken, the official checking for ball touching the net at serve either died, or had severe consequences after a serve accidentally hit him in the head. By the way, did it happen at Wimbledon in the past?
So, aiming at the body of your opponent, with full pace from short distance can be dangerous. No excuse here.