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
using polylines for DXF export #448
Conversation
I saw you removed the DICTIONARY entry - was that on purpose? At least older versions of Inkscape required that, but I haven't tested that lately. |
No, it wasn't on purpose. I simply did what I thought was correct. If you know a better way of doing it and that's better, I would appreciate to get it improved. |
Which software do you import into for laser cutting? The new dxf output fails to import into QCad, which is one of the primary target tools. I haven't yet tried LibreCad. We should write up some manual tests to make sure we cover this properly. |
I also sometimes use OpenSCAD for lasercutting and I use VisiCut, a opensource tool for lasercutting. |
I use Inkscape for tweaking the design before sending the files to my lasercutter service provider. I don't know which software he uses, but, since I save the result in Inkscape, he never receives the original DXF files generated directly by OpenSCAD. The kinds of tweaks I do with inkscape are related to coloring the portions of the file that should be laser-etched. I'd love to automate this process. I'm not a QCad (community edition), LibreCAD, FreeCAD or VisiCut user (yet! But would be happy to try these in order to improve dxf polyline export). I do not use Corel, Illustrator, QCAD (non-free cutting-edge version) or any other proprietary tool. I cannot help with these. The interested parties will have to test features on these by themselves if they need it. |
A very similar patch was attempted merged a long while ago: fe5e199 In short: This is a larger project than merely outputting polylines.. |
I just ran into this problem as well - because the segments are cut apart, our visicut/laos powered lasercutter jumps all over the place trying to cut them one by one... In case it helps, openjscad.org seems to generate polyline DXF files that import into inkscape and visicut just fine, though I haven't got autocad to test. This openjscad program:
Generates this DXF file: https://gist.github.com/matthijskooijman/c71338b4a5feaf091ab4 Anyone with autocad that can confirm it still loads? |
Since OpenSCAD-2019.05-x86_64 still exports lots of chopped-up lines, but has a perfectly good SVG export, attached is a quick standalone workaround in Python 3 to convert SVG output to DXF using LWPOLYLINE, via the "svg.path" and "ezdxf" libraries. This obviates the need to use Inkscape as an intermediate (in my case, Inkscape was struggling). |
Closing, abandoned long time ago. |
Since this comes up in google searches still, I'll add the solution I settled on here. The only catch is that the I would also like to point out, that it would still be really nice to have a proper solution integrated into openscad directly. |
I tried the This can be accomplished by cloning the inkscape extensions repository and trying something like:
However, whilst this produces a DXF (from an OpenSCAD 2021.1 SVG) the DXF seems to be a collection of unconnected lines instead of a nice polyline. What I ended up doing was a view of my part with I just wanted to say thanks, @RudolfCardinal -- I now have a DXF file that I think I can get manufactured! Any idea what's causing the flip? I assume it's just 2 different co-ordinate systems. |
Everytime I send DXF files generated by openscad to our laser cutting service provider, they complain that the vectors are "all broken apart". I ended up figuring out that it means the current DXF exporter generates several independent line segments.
So this patch uses DXF polilynes instead, which makes it much nicer to do further editing of the generated DXF vectors.
happy hacking,
Felipe Sanches
metamaquina.com.br