YORIK’S COFFEE CORNER

You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.


in categories  blender  freecad  opensource  permalink:  116   posted on 11.07.2011 20:40
From Yorik

Exporting 2d linework from blender 2.5



Blender 2.5X still does not feature the excellent dxf exporter Migius wrote for blender 2.49, so I mounted this little workaround to be able to export linework from a blender model to a 2D CAD application such as FreeCAD or LibreCAD (or AutoCAD if you really must...).

It is made of two scripts, a blender addon to export and a FreeCAD macro to import. In blender, install the addon the usual way, then use it from the export menu to export the selected meshes. What will be exported is simply all the edges of the selected meshes in a text file, one edge (2 vertices) per line.

Then, place the FreeCAD macro in your macros folder, then run it, select the exported .txt file, and voila, your objects edges get imported, one compound object is created per blender object. You can then select everything and export to dxf if you want.

Here are the two scripts:
http://yorik.uncreated.net/scripts/blender25/io_export_flat_edges.py
http://yorik.uncreated.net/scripts/importFlatEdges.FCMacro


The meshes to be exported in blender


The imported linework in FreeCAD


The same linework exported in .dxf fomat and opened in LibreCAD.

First and foremost, your name:

And your message:

To publish it, just press this ...