Subtracting a cylinder from a cube

Hi, I’ve been wrestling with this problem for weeks:

Lets say I have a wall composed of triangles, if I shoot a cylinder (like a phaser blast from star trek) at it, how do I reshape the wall to leave a cylinder shaped hole, and create a cylinder inside it?

Example scenario: a cube with 6 sides, 8 triangles per side gets shot by a cylinder with 8 triangles at its base. The cylinder touches the center of one of the cube’s sides. I now have to move the affected side’s triangles about, leaving a gap so I can move the cylinder inside.

What’s the algo for that?

You should look for "boolean operation polyhedra" on the search engine of your favor.