Also you said "If the 4 vertices are not on a flat plane then you can get different results depending on which 3 vertices are exported" -- but a polygon face is NOT valid unless all its vertices are co-planar.
Sorry, I didn't explain that well. When a triangular face is extruded to make a triangular prism the vertices on each 4 sided face
are co-planar, but the x,y,z values may have non-whole number values. My point was that rounding the values of the vertices of the extruded second triangle would make them non-planar. Only 3 of these vertices would be exported to the .map file which would give varying results depending on which 3 were sent. The problem here is that because the existing method uses 4 sides faces then you are forced to accept either non whole number vertices or vertices that were not co-planar.
This is why I wanted the script to take a triangle and extrude a single point from the centre and conect it with more triangles. Since triangles are inherently co-planar then all the vertices could be rounded to whole numbers without any side effects. I figured that whole numbers and triangles would be the best bet to get non-deformed brushes.
Any approach that merely converts faces into brushes is seriously flawed.
Quite possibly, I was simply trying to make it work correctly. Mind you, if you had a decent manifold mesh then all the new triangles would be inside it and only the outside ones would end up getting compiled, wouldn't they?