【发布时间】:2012-06-08 17:45:51
【问题描述】:
人们通常希望反过来这样做,但我想使用脚本等将 dxf 图像转换为 svg。
怎么做?
【问题讨论】:
-
1) 安装带有 Windows 的虚拟机。 2)使用类似benzsoft.com/dxf-to-svg.html
标签: command-line svg vector-graphics file-conversion dxf
人们通常希望反过来这样做,但我想使用脚本等将 dxf 图像转换为 svg。
怎么做?
【问题讨论】:
标签: command-line svg vector-graphics file-conversion dxf
从 0.47 版开始的 Inkscape 能够导入 dxf,但可能需要一些手动清理。导入似乎会展平所有层,包括隐藏层。
【讨论】:
Vector Express 是一个用于转换矢量文件的免费 API,您可以使用 CURL 来使用它。
https://github.com/smidyo/vectorexpress-api
path。curl https://vector.express/api/v2/public/convert/dxf/auto/svg/
curl --data @myvector.dxf https://vector.express/api/v2/public/convert/dxf/cadlib/svg/
resultUrl获取文件
curl https://vector.express/api/v2/public/files/[id].svg --output converted.svg
【讨论】:
对于正在寻找将有问题的 dxf 文件导入 Inkscape 的方法的任何人,我支持使用 Vector Express 的建议。 您可以要求它进行 dxf -> dxf 转换:
curl https://vector.express/api/v2/public/convert/dxf/auto/dxf/
这让我可以将“Slicer for Fusion 360”生成的 dxf 文件导入 Inkscape。 将事物保留为 dxf 而不是转换为 svg 的优点是保留了图层信息。
【讨论】:
ImageMagick 可用于convert images between various formats 以及调整图像大小、模糊、裁剪、抖动、绘制、翻转、连接、重新采样等等。不过,我不知道它是否支持 dxf 和 svg。
【讨论】: