Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXF Exporter #6

Open
DaveCoventry opened this issue Jan 10, 2016 · 3 comments
Open

DXF Exporter #6

DaveCoventry opened this issue Jan 10, 2016 · 3 comments

Comments

@DaveCoventry
Copy link

I want to generate 2D DXF drawings from my Blender models.

Currently I use a "visible" linetype and a "hidden" linetype, which I save as SVG and then use Inkscape to convert to DXF. Unfortunately both linetypes end up on the same layer "strokes" and I need them on separate layers to edit them.

Also, would it be possible to convert directly to DXF? It handles circles and arcs so much better than SVG.

I know a bit of python (although I'm not sure if I'm up to this as I doubt it would be trivial) and am familiar with the DXF file format. While files would I need to edit?

@xuv
Copy link

xuv commented Jan 11, 2016

Not sure this is what you're looking for, but there seems to exists already a DXF exporter for Blender.
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/DXF_Importer

The way I understand Freestyle-SVG-exporter, as you said, it will not be trivial to change this plugin to export to DXF. I don't think it would even make a "useful" DXF as lines out of Freestyle are mostly not continuous.

@DaveCoventry
Copy link
Author

Hi Xuv, thanks for the response.

After a bit of thought, I think a better approach may be to convert the simple paths from the generated SVG file and convert these to DXF preserving the linetypes on separate layers.

The DXF exporter that you link to exports a full 3D model rather than the plan, side-elevation and end-elevation orthographic projections I want. The old 'pantograph' exporter for Blender 2.49 was closer to that ideal, but alas it has been discontinued.

~ Dave

@folkertdev
Copy link
Owner

Hi Dave,

The separation into layers is based on (1) render layer and (2) line set (not style!). All line sets get their own svg layer that you can manipulate in inkscape. The set layers have sublayers for strokes and fills. This means that all strokes from a line set will be joined into one layer.

So (and I´m not totally sure what your use case is) you want to put what need to become different svg layers in different Freestyle Line Sets. Then, I hope that the Inkscape -> DXF converter is smart enough to do what you want.

As @xuv said, making a Freestyle DXF exporter is non-trivial (though, I assume, quite doable). The discrete, pointwise nature of Freestyle lines is also not ideal as input for a discrete format (but the same could be said of conversion to SVG, of course).

If you experience any further problems, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants