slicing a mesh

I had started some work about slicing a mesh some time ago. I sticked to an infinite plane katana, which keeps things simpler than with the beam you’re thinking about, but there might be some code in there that could help you.