I made a small script that exports selected objects to a DXF file. The objects must be flat and be only contours, since they will be turned into polylines. I made this mainly to export the cross sections generated by our crosssection script ( http://yorik.orgfree.com/scripts/CrossSection.py ) to cad programs.
The export script is here below, it needs Stani’s sdxf library too, placed in the same folder.
Right now, each object must contain only one edge loop (one polyline). I would like to add a piece to the script, that would sort edges inside the object into “islands”, or connected parts. That is, it would be the same thing as the “separate all loose parts” command in Blender.
But I find it quite complicated to do… I thought about throwing edges in different “baskets”, but I cannot make edge C know that it is connected to edge A via edge B, so it is thrown in different basket than edge A, so I need to scan baskets again and again… it’s long and complicated code.
By chance someone knows a simpler way to achieve that?