Refactored mesh slicing code into a new TriangleMeshSlicer class