-
-
Notifications
You must be signed in to change notification settings - Fork 83
Description
followup to LibreCAD/LibreCAD#875
The referenced LibreCAD issue is caused by LEADER entities without coordinates.
Means code 76 is 0 and AutoCAD abandon loading this file. Whereas other CAD software load the file by ignoring the malicious LEADER entity. This includes latest LibreCAD.
Investigating this LibreCAD issue brought up, that libdxfrw saves code 76 twice.
Lines 1043 to 1044 in 072aecd
| writer->writeDouble(76, ent->vertnum); | |
| writer->writeDouble(76, ent->vertexlist.size()); |
While this seems not to be a serious issue, it should be fixed anyhow.
It is also indicated, that the whole LEADER entity should be dropped on writing when ent->vertnum or ent->vertexlist.size() is less than 2.
This will not solve the cause of the LibreCAD issue, but it will avoid that AutoCAD rejects the file when the issue happens.