Keith,
I admire the considerable effort you have put in to this project and what you have achieved in such short space of time. Thank you!
As you have the ability, I can't help but wonder why you don't instead write a STEP or IGES exporter for openSCAD? Or perhaps even a standalone openSCAD CSG to IGES/STEP translator if converting directly between those formats made more sense? Is doing so really that much more complex than what you have achieved to date?
I see that writing an IGES exporter is in the openSCAD project 'todo list' anyway - and both IGES and STEP formats contain native support for CSG entities. Additionally, FreeCAD is capable of importing IGES and STEP - together, of course, with most other mainstream CAD software.
Searching for solutions, I came across the site of Walter Heger, an IBM engineer:
http://wheger.tripod.com/step/
Here's an excerpt from that page: "
I wrote software to convert Constructive Solid Geometry (a description of 3D CAD using solid primatives (rectangular solid, cylinder, sphere) and operations on them [union, intersection and subtraction]) to a Facetted Boundary Representation (describing the geometry [point, line, plane] and topology [vertex, edge, loop, face, shell]) using Euler Boolean operations."
Some or maybe all his source code is available for download - perhaps you might find it useful or inspiring.
Which ever way you enable CSG data to escape the clutches of openSCAD in a quality-lossless form, I shall be truly grateful!
Keep up the great work,
Hamish