Some time ago I had a look at LibreCAD and it included a tool for importing vector svg files.
After a Hardrive overwrite (thank you, Microsoft) I have installed LibreCAD on a clean system but I find that the function is no longer there. There is the outline of a raster image, but the vector image no longer appears.
Am I going mad?
QCAD has an SVG import tool, but this discards critical line data that I need.
Compiler: GNU GCC 9.3.0
Compiled on: Mar 23 2020
Qt Version: 5.14.2
Boost Version: 1.71.0
System: Ubuntu 20.10
I have also installed the Github files from source but the issue remains.
Yes, FreeCAD does have a dxf export function, but this is unable to differentiate between hidden lines.
I can define hidden lines as having a different line thickness and/or a different colour, but when exported to dxf these are lost.
They are present in the svg file, but are lost when Inscape converts the file to dxf.
What I can do is split the svg into 2 separate svg files in Inkscape, but this is tedious.
The version of LibreCAD that I was using previously had an import function that imported the files with the line colours intact which allowed me to place them on separate layers so that I could style the hidden linetypes.
Thanks for the sample file. I didn't find a way or a different app that could keep the colours intact when exporting to dxf. I understand it would be a tedious task to change lines to different colour or layer manually, with such a complex drawing.
I had one idea for a workaround. If it's possible in FreeCAD, you could make a dxf with hidden lines shown and one with only the visible lines, with the same position. Open the first in LibreCAD, then import the second on an extra layer, lying exactly upon the other, maybe giving it a slightly larger line thickness to cover the one beneath. Choose colours, and use the Order commands if necessary.
For the importing operation you may use copy and paste from one drawing into the other.
The saga is going on.
I tried with Blender, a very old version so it ran on my old XP pc. It could import svg but it seemed not to show the colours, and couldn't export to dxf. I didn't grasp Blender anyway and didn't want to spend too much time on it.
Then I had an idea. I converted the svg to pdf in Inkscape. I had an old test version of an app called pdf 2 dxf. This did the job, it produced some 256 layers, the black lines on layer 0, the grey lines on layer 253. The other layers were empty. So for each possible colour one layer. iso_test.dxf LibreCAD 2.2.0 rc2-1 (the latest) wouldn't open it. "Please test its existence and permissions".
I tried with NanoCAD5, yes! And I tried with Freedraft, an older simple free app. Yes! I deleted the empty layers and saved it in Freedraft. iso_test_freedraft_bereinigt.dxf This one LibreCAD 2.2.0 rc2-1 was inclined to open.
Just to be sure there was no difference I tried the first iso_test.dxf with LibreCAD 2.1.3 and to my surprise it opened! Tadaa!