The problem is the following: I have a model that consists of a rectangle and a cylinder inside, the idea is to generate a 2D dxf file that allows me to take the layers and entities, and do it with a ruby script, I have tried several things but I have not been
The 1st suggestion is: Be more specific when asking coding questions.
And PLEASE use sensical and specific topic titles, not vague questions.
2nd: “Why reinvent the wheel”? There are already DXF export extensions available on the Warehouse and at SketchUcation.
I think Garry posted a simple one here somewhere. Search on “Simple DXF”.
If you really want to do this … make an attempt, and show us your attempt and ask specific questions about what is not working.
So, a general hint, to get 2D from 3D you will need to virtually project 3D vertices onto the ground plane and use those 2D points when you construct your DXF text lines.