After a bit more reading (something I should have done before yesterday), I see now that the STL format only requires the tessellated surface geometry of the part itself, no sectioning. There are very easy routines within Wildcat (see WCNurbsSurface::GenerateClientBuffers for example) that can already provide this (even to a nearly-arbitrary accuracy thanks to native 64-bit NURBS geometry). Since trimmed NURBS surfaces are not actually fully tessellated for display it would require some work to get them to output triangles, but not too much. I think that I could write that routine in a couple of days.
An outline of an STL exporter would look something like this:
- User generates part and executes exporter
- Query surfaces of the WCPart object to get list of surfaces
- Generate appropriately accurate tessellation for each surface (already includes normals for each triangle)
- Order output and write to file
It really should be that easy. I think. I was looking around online for documentation of the STL format and only came across one document that looked semi-official, here. Is this still accurate?
If this is a priority for uses, I can move this up. It would be way too cool to see parts from Wildcat. Of course they will be very simple parts, but parts none the less. Let me know.