E
by elschilling on 4 Feb 2024, edited 17 Mar 2025
#
+7 votes
Collaboration often involves sharing 2D drawings in dxf format, so people can work in their favorite program. Tipically the drawing elements are organized with layers with different colors, lineweight and linetypes. This is important for increased readability and easily change visibility, lock or unlock parts of the drawing and so on.
Currently, dxf files exported with Inkscape from svg generated with BlenderBIM doesn't contain any layer information.
This project is looking to solicit the funds to help develop an Inkscape extension that allows:
-
Create Inkscape layers from svg elements associated with different IFC classes made with BlenderBIM
-
Allow configuration of the layers attributes (name, color, lineweight, linetype) for each IfcClass
-
Export to dxf with layers information



This has been discussed in the following locations:
As you can see in the links above, there has already been some work in the regard. With this project, we hope to build off this initial work and it will be useful when implementing direct dxf export from BlenderBIM
T
by theoryshaw on 4 Feb 2024, edited 4 Feb 2024
#
+2 votes
Awesome!
Posted it on our Open Collective site!
https://opencollective.com/osarch/projects/convert-blenderbim-svg-to-dxf
...
_The project was created through the following initiative.
https://community.osarch.org/discussion/1741/have-an-idea-youd-like-to-get-funding-for-or-see-realized_
G
by Gorgious on 5 Feb 2024, edited 5 Feb 2024
#
+3 votes
FWIW it should be relatively straightforward for someone familiar with both svg syntax and ezdxf API to write a converter. I'll share a test I worked on some time ago. I eventually elected on directly writing to dxf from the 3D blend file because I personally don't have a use for svg and it doesn't translate 1:1 to the dxf syntax. for example in a svg an object can be part of any number of classes but in dxf an object can be in only one layer.
I'll drop the link. Do with it what you wish, the current implementation translates polylines, hatches and texts. Hatches are translated to solid, not patterned, same for lines, they're continuous. https://github.com/Gorgious56/svg2dxf/blob/main/convert.py
E
by elschilling on 14 Feb 2024
#
+7 votes
Update implementing a new ezdxf based inkscape exporter extension.
Basic functionality is done thanks to @Gorgious input and adapting from the existing DXF exporter. Still need to add lineweight, linetype and save/load settings options.
Video:
N
by Nigel on 14 Feb 2024
#
+1 votes
@elschilling nice work to you all. Will the save/load settings be an external text file that can be edited externally? It is good to have a 'save settings' file for each recipient of the exported drawing so they can be customized to their needs.
E
by elschilling on 17 Feb 2024, edited 18 Feb 2024
#
+6 votes
@Nigel said:
Will the save/load settings be an external text file that can be edited externally? It is good to have a 'save settings' file for each recipient of the exported drawing so they can be customized to their needs.
Yes. It is possible to have multiple export settings saved as json files that can be edited externally or with the inkscape extension GUI.
Here is an update:



The extension is available here
To install copy the ezdxf_exporter_effect.inx
and ezdxf_exporter_effect.py
to your inkscape user extensions folder and install ezdxf library with pip install ezdxf
After that there should be a new option called IfcClass exdxf exporter available at Extensions > Export menu
Next I will implement text and hatch support.
Any help testing and feedbacks are appreciated
E
by elschilling on 18 Feb 2024
#
+6 votes
I've packed all dependencies into a zip file for easy installation. Just extract it to the Inkscape user extension folder.
Tested it on Windows 10

A
by Ace on 28 Feb 2024
#
Hey @elschilling I have installed the exporter on Windows 10 and I just get to the place where I can save the DXF but it is not saving, after clicking the button it just does nothing,

not sure If I messed up the extension installation or there is a step to the process I've missed?
T
by theoryshaw on 28 Feb 2024
#
@Ace Did you download and extract the following? https://github.com/elschilling/class2layer/releases/tag/v0.0.1
A
by Ace on 28 Feb 2024, edited 28 Feb 2024
#
+1 votes
Hi @theoryshaw yes I extracted the top zip
I downloaded the latest updated zip

and copied the contents into the extensions folder found here:
C:\Program Files\Inkscape\share\inkscape\extensions
The extension itself appears in Inkscape and I can get all the way to the screenshot I posted, then when you click 'save' it doesn't commit or something, just does nothing.
I'm using Inkscape 1.3 on Windows 10,
T
by theoryshaw on 4 Mar 2024
#
+2 votes
I've experienced this too, just now. I think it's working, but just gets hung up, and freezes.
I can't convert the attached file.
E
by elschilling on 12 Mar 2024
#
@theoryshaw said:
I've experienced this too, just now. I think it's working, but just gets hung up, and freezes.
I can't convert the attached file.
Could you please share the ifc file that this svg comes from? I confirm the bug both on windows and linux environments. On linux I could detect the error message that says 'Segmentation Fault'. I suspect that the bug is related to the markers definition of the generated svg. A temporary workaround is:
-
Open the drawing with Inkscape
-
Copy all drawing elements
-
Open another Inkscape and paste your drawing
-
Export to dxf
I will try to make specific xpath query to filter only drawing elements
T
by theoryshaw on 13 Mar 2024
#
+1 votes
NP, here's the file (Restaurant_Sun_Prairie.ifc
) with all the BB dependencies.
The name of the drawing is FLOOR PLAN - 1ST-cad_background_test
.
And here's the svg.
Thanks!
T
by theoryshaw on 3 May 2024
#
Hi @elschilling, did you run into a roadblock here? Anything I can help with, to help troubleshoot.
...
If this is a lot of work, my vote would be to release the funds to you now, as you already put in a lot of effort.
Would be nice to see some funding movement on these campaigns.
T
by theoryshaw on 15 Jun 2024
#
+6 votes
Hi @elschilling, the steering committee would like to release the funds to you for this work.
To start the process, please submit an expense for $316.12 USD, here: https://opencollective.com/osarch/projects/convert-blenderbim-svg-to-dxf/expenses/new
Thank you for your work!
...
For those interested, if the latest commit from https://github.com/elschilling/class2layer gives an error, the following earlier approach works...
from: https://github.com/elschilling/class2layer/tree/40fff3528e4964dfdc9007689b4afc9f21d786a9
S
by Stealthmasterflex on 17 Mar 2025
#
Hi @elschilling this is a great extension! Thank you for your work. Any new on the support for text?