sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
Quote:
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
_________________________________________


__________________________________________

download the newest version from Manual on BlenderWiki
__________________________________________

PLEASE post your 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

Last edited by migius; 08-Jun-09 at 21:47. Reason: links update
#1   Old 26-Sep-08, 02:16   
Reply With Quote


yorik's Avatar
yorik yorik is offline
Member
 
Join Date: Mar 2006
Location: São Paulo, Brazil
Posts: 129
Cool, I think this is a much better way than mine... You're the man, migius! Thanks!
............................................
http://yorik.orgfree.com
#2   Old 26-Sep-08, 02:39   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
Quote:
Originally Posted by yorik View Post
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)
............................................
projects: CAD-tools, DXF-Exporter, DXF-Importer, Image Browser, BPyBrowser
#3   Old 26-Sep-08, 02:59   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
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.
#4   Old 26-Sep-08, 03:35   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
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
............................................
projects: CAD-tools, DXF-Exporter, DXF-Importer, Image Browser, BPyBrowser
#5   Old 26-Sep-08, 04:03   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
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....
#6   Old 26-Sep-08, 04:08   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
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?
............................................
projects: CAD-tools, DXF-Exporter, DXF-Importer, Image Browser, BPyBrowser
#7   Old 26-Sep-08, 04:23   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
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.
#8   Old 26-Sep-08, 04:26   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
Quote:
Originally Posted by WiKKiDWidgets View Post
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)

Last edited by migius; 26-Sep-08 at 04:36.
#9   Old 26-Sep-08, 04:34   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
YEEEEHAAAA!!!

Okies, I downloaded your zip again, and used your test.blend. I exported the squiggley lines and it opened in Sheetcam PERFECTLY!
#10   Old 26-Sep-08, 04:39   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
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?
#11   Old 26-Sep-08, 04:41   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
Quote:
Originally Posted by WiKKiDWidgets View Post
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)
............................................
projects: CAD-tools, DXF-Exporter, DXF-Importer, Image Browser, BPyBrowser
#12   Old 26-Sep-08, 04:55   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
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!!
#13   Old 26-Sep-08, 04:56   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
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
#14   Old 28-Sep-08, 12:40   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
Roger that....
#15   Old 28-Sep-08, 13:07   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
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\Concep tual
\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.
#16   Old 28-Sep-08, 14:06   
Reply With Quote
migius's Avatar
migius migius is offline
Member
 
Join Date: Mar 2005
Location: Berlin, Germany
Posts: 520
Quote:
Originally Posted by WiKKiDWidgets View Post
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.
good point, i will correct it


Quote:
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
#17   Old 28-Sep-08, 14:11   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
Go Migius! Go Migius Go Migius!
#18   Old 28-Sep-08, 14:47   
Reply With Quote
WiKKiDWidgets's Avatar
WiKKiDWidgets WiKKiDWidgets is offline
Member
 
Join Date: Sep 2008
Location: Oregon, USA
Posts: 91
I was using an older version of the Import DXF script. Current version: 1.12 - 2008.08.03 works perfectly!

#19   Old 28-Sep-08, 17:24   
Reply With Quote
studioa studioa is offline
Member
 
Join Date: Nov 2005
Location: Columbus, OH
Posts: 208
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_
#20   Old 28-Sep-08, 20:53   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 18:28.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists