Contact me: hankecnc@gmail.com

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272

推推 grbl 3年前 (2023-02-03) 317次浏览
关闭
PeterGrace 打开了这个问题 2017 年 4 月 19 日 · 11 条评论
 Closed

评论

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272

将附加的折线正方形 dxf 导入 LaserWeb4 以进行切割功率/速度测试,但是工作区似乎显示每条折线都缺少正方形的底部。我在 inkscape 中验证了 dxf 文件,它显示方块正确闭合。

CuttingTestWorkspace.json.txt
CuttingTestDesign.dxf.txt

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
 评论了 2017 年 4 月 19 日 通过电子邮件
将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
作者
彼得格雷斯 评论了 2017 年 4 月 19 日  

不,我用 QCad 制作了 dxf,我用 inkscape 来验证我没有疯。:)

您是否希望我通过其他来源验证文件?大多数时候我都信任 QCad,但我不希望它看起来像是我在没有尽职调查的情况下就把它扔给了你。

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
 评论了 2017 年 4 月 19 日 通过电子邮件
将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
成员

这是另一个有这个问题的 DXF。外部路径已关闭但正在导入为打开路径。

微调器 r15.dxf.txt

这是来自https://plus.google.com/102797371787170159448/posts/1h2hRAsf1BX

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
 评论了 2017 年 4 月 19 日 通过电子邮件
将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
贡献者

@PeterGraceCuttingTestDesign.dxf是不稳定的,因为 LWPOLYLINE 实体都被列为shape: false所以我的解析器跳过最后一次关闭形状的调用。我在 DraftSight 中打开您的文件并保存在 R12 和 R14 中,只有 R12 可以正确渲染。

I will need to see if the issue is in the DXF parser itself. Officially It only supports R12 ASCII DXF which is old but reliable.

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
Contributor

PR #273 address the wonky layer grouping that was in the file.

@PeterGrace According to the DXF Reference 70:1 means the shape is closed. You’re example file is 70:129 which is not a valid pairing and defaults to 70:0

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
Author

This is a QCad file, as R15 (generated by dxflib) — let me try R12 and will confirm if that solves the issue.

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
Author

Saving the file as R12 (Teigha) in QCad allows the polyline to properly render in LaserWeb4. I suppose the problem is with QCad then? As mentioned, Inkscape renders the incorrect dxf as well, leading me to wonder if their definition of the dxf format does not match autocad’s reference as you have shown.

Regardless, I’m unblocked; I can save the file in R12. Thanks for having a look!

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272
Contributor

@PeterGrace No problem!

AutoCad has so many bloody versions and a few in between are not even compatible as they liked to change code pairs meanings but not too unique pairs but to older version ones which makes everything confused. You can see they added a TON of padding to R15 as its literally 10x the file size as R12.

将 DXF 导入 laserweb4:折线在 DXF 中闭合,在工作区显示中未闭合 #272

PR #273 merged