-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
There should be a single DXF importer/exporter #13599
Comments
Ideally the newer, built-in C++ dxf importer should be used but it still does not support all the features of the old one... Not sure how fast this can be done, it basically needs volunteers to work on it :) |
Thanks for the reply. Sure, there's no hurry but I just wanted to document this for the future and ask if it's already planned. Maybe a potential GSoC candidate? |
Is there a list of missing features, or a side by side comparison of the two existing importers/exporters? If there isn't, how how could a community member best start compiling such a list? For context, I could not even find the source code for the legacy importer's DXF library (I understand there are license compatibitibility issues and that's why it's not distributed, but I don't quite understand where the actual code resides). I did find some interesting information here though: https://forum.freecad.org/viewtopic.php?style=1&p=2448#p2448 Edit: found the source code at https://github.com/yorikvanhavre/Draft-dxf-importer |
Purely from a personal point of view, my defacto goto solution to get a dxf file into FreeCAD is https://pypi.org/project/ezdxf/ it's extremely well maintained in my experience, handles layers well and I just run a macro to convert all the objects to sketches. |
Out of interest, which macro do you use to talk to ezdxf? I've noticed a similar approach at https://forum.freecad.org/viewtopic.php?t=81962, but I've not tried it. |
I use https://github.com/FreeCAD/FreeCAD-macros/blob/master/Conversion/DxfToSketchLayers.FCMacro but I've not tested it on recent 0.22dev so it might need modifying. Ignore the installation part of the code, just install ezdxf using pip before running the macro. |
It depends a lot on your given workflow too... DXF files are used for sometimes very different purposes. In the construction field, DXF files with thousands of small objects are not a rarity, while for people working with CNC a DXF file is often one single, precise profile shape. So for some users it's important that files import as a clean sketch, for others that would be counter-productive |
I think I can answer my own question now, as I did that side by side comparison. It is not exhaustive and only includes those features in the preferences dialog (e.g. it does not contemplate DXF entities support, etc.). It might need another pair of eyes to confirm that I read the code correctly, but I hope it provides an overview of the current status:
From:
|
Is there an existing issue for this?
Problem description
DXF import/export is a hot topic. There have been many issues with it and it seems that there are still some problems left. Apparently, the legacy importer/exporter should be used in most cases. But ideally, there should be only a single importer/exporter (with all the benefits and features of the current two implementations) or at least the better/recommended one should be the default to avoid the confusion. Are there any plans for that? I guess that it won't happen before the next release but it's something that should be resolved as soon as possible, in my opinion.
Full version info
Subproject(s) affected?
Core
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: