在 Inkscape CLI 中将 SVG 转换为 DXF

use*_*030 1 svg inkscape dxf

我想知道如何在 Inkscape CLI 模式下将SVG转换为DXF。在 GUI 中将 svg 导出/保存为 dxf,我们可以通过“另存为”从文件菜单中完成

我浏览了 inkscape cli 文档:https ://inkscape.org/doc/inkscape-man.html

这里主要使用导出词,所以我尝试了

inkscape --export-type=out.dxf in.svg
inkscape --export-filename=out.dxf in.svg
Run Code Online (Sandbox Code Playgroud)

但没有成功给我 errpr

InkFileExportCmd::export: Unknown export type: out.dxf. Allowed values: [svg,png,ps,eps,pdf,emf,wmf,xaml].
Run Code Online (Sandbox Code Playgroud)

但是在 GUI 中的 FILE -> SAVE AS 下我们可以看到很多文件格式,包括 DXF

小智 5

您需要使用可用参数从命令行运行扩展。在 Inkscape 安装文件夹的 目录中找到它/share/inkscape/extensions。

所以,在最基本的版本中:

python3 dxf_outlines.py  --output="yourfile.dxf" "yourfile.svg"
Run Code Online (Sandbox Code Playgroud)

您还可以输入

python3 dxf_outlines.py -h
Run Code Online (Sandbox Code Playgroud)

了解有关选项的所有信息。