DWG/DXF-exporter - release (2.49)

http://wiki.blender.org/uploads/8/80/Manual-Exporter-DXF-gui127.png

The most recent version of the exporter and the documentation are located on BlenderWiki

If you want to support me - become a subscriber and get the Personal Edition

For Blender 2.5+ you will need another version: look there


2008.11.26:
inspired by Yorik’s 2d-profile exporter script i went back to Stani’s Python library to generate DXF files and adopt it to work in Blender today. It is a first draft - don’t await to much! There are only mesh and curves to LINEs support now. GUI and 3DFACE support are planed. I need your feedback.
migius

PLEASE post your questions and bug reports in this thread.

Edit: updated version 1.25beta needs intensive testing before integration in release 2.48
Edit: updated version 1.27beta 2008.10.07
Edit: updated version 1.34 - 2009.06.08
Edit: updated version 1.37 - 2010.06.23

1 Like

Cool, I think this is a much better way than mine… You’re the man, migius! Thanks!

you are welcome

please download again - updated version seams to work correct for transformed objects (matrix)

I just followed this over from Yorik’s original post. I downloaded the script linked from here and I’m not sure I’m follwoing you two. Is this supposed to export a DXF file? I looked in the script and it looks (to my untrained Python eyes) like a python Library file inside. I’m baffled here, help me out.

hi WiKKiDWidgets,
current version can export selected objects: mesh(edges) and curves(not nurbs) to LINEs.
load it into blender-text-window and start with alt-P,
or copy the script into blender scripts folder and start through files-export-autodesk DXF

This early version has no UI, no dialogbox to define output name, the script writes into current project directory: “blend_test.dxf”

The output is in dxf-r9 format and should be readable in any CAD app.

i hope it helps
migius

Ahhh, Okies. hehe, I just dropped in in the scripts folder and ran Autodesk DXF. hehe, no wonder it didn’t do anything dicernable. ok, will test here in a few minutes…

WiKKiDWidgets,
please download again, i put there my blend file for testing.
DXF file produced from it loads well into autocad and can be entirely reimported to Blender (with DXF-Importer python script)
I am curious, what is different with your model?

OK, well its running. I can see the output of the script in the Output window. what do you mean by ‘current Project Directory’. I am looking for blend_test.dxf all over and can’t find it.

‘current Project Directory’ is where your blend.file is started from.

I’ve added finish-message-box for better feedback, (download again, hehe)

YEEEEHAAAA!!!

Okies, I downloaded your zip again, and used your test.blend. I exported the squiggley lines and it opened in Sheetcam PERFECTLY!

omg, I just realized you did standard lines instead of Polylines or LWPolylines, groovy man, groovy. Are you going to add some Dialog to it to make it a bit more freindly?

nice to see you happy. Make me happy too and send some pictures from your models exported to Sheetcam

The exporter has good chance to become full service GUI (the same standard like the DXF importer)

Just tested it using one of my models that created for cutting out on my CNC machine and it worked perfectly. Way to go Migius and Yorik!!

updated version 1.25beta needs intensive testing before integration in release 2.48
see the first post in thread
PLEASE TEST IT and post here your bug reports

Roger that…

Ok Migius!
All the Export methods appear to work great. I can open them up in all my other CAD/CAM programs. I really like the “Flat to 3D-View” Although, I would rename the function “3D-View to Flat” because that is a more accurate description of what is occuring.

The Import function is not doing so well. I can import many other DXF files using this script, but if I try to Import the DXF I just Exported, I get the following error:
Import DXF to Blender *** START ***
Getting settings…
start reading DXF file: C:\Users\Master\Documents\3D\WiKKiD_Widgets\Conceptual
\ExportTest.dxf.
finished reading DXF file in 0.0552 sec.
Traceback (most recent call last):
File “<string>”, line 4048, in bevent
File “<string>”, line 2962, in main
File “<string>”, line 3100, in drawEntities
File “<string>”, line 3192, in drawer
File “<string>”, line 3249, in setObjectProperties
File “<string>”, line 3293, in setMaterial_from
File “<string>”, line 2660, in call
File “<string>”, line 2672, in add
KeyError: ‘0’

I can Import the test DXF I Exported using the DXF Import Script that comes with blender. Although, the lines are not continuous. Each polyline is its own mesh.

good point, i will correct it

The Import function is not doing so well. I can import many other DXF files using this script, but if I try to Import the DXF I just Exported, I get the following error:
thanks, i will check it too

Go Migius! Go Migius Go Migius!
http://www.wikkidwidgets.com/images/cheerleader8.gif

I was using an older version of the Import DXF script. Current version: 1.12 - 2008.08.03 works perfectly!

:smiley:

Migius, I’ve tested the exporter for one of architectural projects and it works well. The .blend file was 65 mb and the exported .dxf was 84 mb. I opened with a different 3d application, and as far as I’ve seen it was ok. If I find any issues I’ll mention them here.
I’ll try the “flat” option and see how that works. That will be very helpful if for architectural models, so for a view (like orthographic view of a facade) to be exported as 2D, then tweaked and finally be part of construction documents. Thanks for your work! a