I am trying to convert DXF files to SVG files using inkscape from the command line. The coordinates in the drawing are scaled and moved for some reason so the output is unusable for me. I need to later add elements to the svg but the coordinates for this is relative to the original coordinates.
No, when i open a dxf file in GUI-inkscape its the same thing. When the original drawing is a square from (0, 0) to (200,200) when I open in GUI its a square but from (0, 370) to (748, 1118). I see now that if I change the document properties back to mm from px the size is right but not the position.
Can i set the document properties from the command line?
I tried saving a default template with mm but i didn't seem to take effect.
I think most of the problems originate from the svg and dxf y axis beeing inverted.
I was able to make this work as expected (by me) by making a copy of /usr/share/inkscape/extensions/dxf_outline.py elimination the unwanted transformations under the comment about "top_level_transformation".
I am also looking into converting from DXF to SVG trying to keep the axis but havn't been able to make the same changes in dxf_input.py i guess the transformation here is more internal to Inkscape and harder to change.
I am trying to convert DXF files to SVG files using inkscape from the command line. The coordinates in the drawing are scaled and moved for some reason so the output is unusable for me. I need to later add elements to the svg but the coordinates for this is relative to the original coordinates.
Is it successful when using the GUI?
No, when i open a dxf file in GUI-inkscape its the same thing. When the original drawing is a square from (0, 0) to (200,200) when I open in GUI its a square but from (0, 370) to (748, 1118).
I see now that if I change the document properties back to mm from px the size is right but not the position.
Can i set the document properties from the command line?
I tried saving a default template with mm but i didn't seem to take effect.
I'd try two settings in the GUI before using the CLI:
Close Inkscape before running the CLI.
I think most of the problems originate from the svg and dxf y axis beeing inverted.
I was able to make this work as expected (by me) by making a copy of /usr/share/inkscape/extensions/dxf_outline.py elimination the unwanted transformations under the comment about "top_level_transformation".
I am also looking into converting from DXF to SVG trying to keep the axis but havn't been able to make the same changes in dxf_input.py i guess the transformation here is more internal to Inkscape and harder to change.