I wrote a simple algorithm which clips an arbitrary 3D object against a plane:
The algorithm roughly works like this:
1) Iterate all triangles
2) Iterate all edges for each triangle
3) If the edge intersects with the plane, either 1 or 2 new triangles are generated, old triangle is discarded
4) If no edges intersect, the triangle is either kept intact or discarded (Depending on which side of the plane it is on)
Of course, this leaves a hole on the mesh where the plane cut through it. What would be a fast way to generate a new mesh to fill the hole? For convex geometry I could just use one of the new vertices on the plane as starting point and connect it to all other new points and generate the triangles that way, however the object isn't necessarily convex.