Can’t remember off top of my head, but I seem to recall Ydnar (has to?) give out the source for q3map2.
I’m after the bit where it turns a .map brush definition into actual faces, or more precisely the code that will take 3 non-coplanar planes and work out the vertex where they meet.
Reason is I’m trying out a little external tool to help create certain features in radiant that otherwise would be a bast, but my 3D maths isn’t up to the initial conversion 
I need to use the .MAP planes definition of a brush and be able to convert it into a polygon mesh so I can fiddle it and then return it back to .map, but sadly I’m no good at plane intersection calculations, so was hoping I could just rip straight from the source 

)… Keep in mind that most of those calculations are pretty unstable numerically, and depending on what you’re trying to do could end up being pretty messy =)