Monday, April 6, 2009

DWG support for Blender

I'm working on AR, a python library for Blender, which might be interesting for ARchitects. It targets primarily Blender python scripters, not Blender end users. However non pythoneers might be interested in the library as well, as some side products are end user friendly.

One of the features I have been working on is DWG support for Blender. It uses the DXF scripts of Blender under the hood, so it is limited to their abilities. Probably export will work better than import.


The supported DWG versions are: 9, 10, 12, 13, 14, 2000, 2004 and 2007. (It can also export to the equivalent DXF formats.)


In case you want to use this plugin for Blender, you need to install my ar package first. It has been tested both on Linux and Windows. (Mac Os X might work as well.) Afterwards read the tutorial for further instructions. You can use my DWG conversion python module also outside Blender.

Are you an architect and coding with Python in Blender? I'd love to hear from you, not just because of this blog post. Just send me an email: spe.stani.be # gmail.com

14 comments:

  1. FANTASTIC!!!! 1000 thanks Stani, this is unvaluable work...

    ReplyDelete
  2. These are good news :)
    Many thanks, Stani!!

    ReplyDelete
  3. nice script!
    just have one problem, when I change the variable of BLENDER_SCRIPTS and after "save" it doesn't assume the directory change...why?

    ReplyDelete
  4. where can I get ar/ar folder???
    I cannot find it anywhere!!
    Help!

    ReplyDelete
  5. @Nikita
    http://sd-2469.dedibox.fr/ar/pages/installation.html

    ReplyDelete
  6. Using Blender 2.49a + Python 2.6.2 I had to modify the script import_everything.py:
    59: rdict = Registry.GetKey(key, True)
    61: Registry.SetKey(key, rdict, True)
    96: ... EveryDWG.path)

    ReplyDelete
  7. Hi! I am using Blender 2.49a + Python 2.6.2
    i had to change following lines in the script import_everydwg.py in order to have it working:

    59: rdict = Registry.GetKey(key, True)
    62: Registry.SetKey(key, rdict, True)
    96: Draw.PupMenu('Error%%t|Can not find "%s"'%EveryDWG.path)

    Also install PIL-1.1.6.win32-py2.6.exe (for Python 2.6)

    All seems to work ok now!

    ReplyDelete
  8. Hi dear Stani.
    I am an architect in Iran. I am also interested in open source softwares and currently I am disributing ubuntu cd's in Shiraz, Iran.
    I really want to completly migrate to Linux. I have 4 years of exprience in linux. I know GIMP, InkSpace, Blender and . . . But still could not find open source equivalents for AutoCAD and ArchiCAD -the most common architectural softwares used in Iran.
    I have tested QCad but it sucks.
    Any idea what software can replace AutoCAD and ArchiCAD ? That would be a great help to me.
    Thanks.

    ReplyDelete
    Replies
    1. just pirate autocad, and run it on VMware Player with Unity. You'll need a window's license and some extra RAM but its pretty seamless, and lets you atleast pretend you're not using window. :)

      Delete
    2. Iranian hello friend, I recommend the Bricscad is a powerful tool for architecture. can be found at this link: www.bricsys.com

      Delete
  9. QCad is for now the best 2D option. Another promising application is FreeCAD:
    http://sourceforge.net/apps/mediawiki/free-cad/

    Otherwise look for freeware which can run with Wine.

    ReplyDelete
  10. any suggestion for mac osx?

    ReplyDelete
  11. @max
    Install wine and follow the rest of the documentation:
    http://wiki.winehq.org/MacOSX

    ReplyDelete
  12. It'very very nice. But instead of clapping de PseudoOpenDWG, I belive we should focus on the LibreDWG project: http://www.gnu.org/software/libredwg/ and turnover the hackish.

    Happy AR!

    ReplyDelete

Filter by topic: spe, python, ubuntu