Maybe a library like any of the following will help to subtract one mesh from the other:
Related thread: