How to rotate around an arbitrary axis?

I have defined a new TCP that is offset from tool0. I want to do a rotation around my new tcp's z-axis (the blue axis in the figure). How do I do that?

Answers