How to convert a set of connected lines to a solid in CAD applications? Tool is being used can be AutoCAD, SketchUp, Solidworks, FreeCAD, or any other software you may know that can do this simple task painlessly. Note that the following graphics is only for demonstration. The desired resulting should be a valid CAD solid to be able apply all related operations such as boolean ones etc.
Just remember the job needs to be done thousands times so manual approaches are not suitable. Even some help to write a piece of code for this job is much appreciated (in any language), so you may explain how to code a simple DXF writer for just Solid, for example. Our play with some DXF exporters in Python was not successful.
Upadate: a simple Ruby code for SketchUp or VBA code for AutoCAD or Python for FreeCAD could be of most help.