try this out real quick. I doubt it'll work. I probably made an error somewhere as it is quite a complex thing :( however very useful to have.
[edit]took out the code cause there's a better one down below
this hopefully handles multi-surface entities.
[edit]took out the code cause there's a better one down below
this hopefully handles multi-surface entities.