You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a dxf file exported from autocad. For some reason there's like 9 lwpolylines in there that have only one vertex and the closed attribute. { type: 'LWPOLYLINE', vertices: [ { x: 294.598692, y: 168.66373 } ], layer: '0', colorNumber: 7, closed: true, transforms: [] }
Now I understand this could be a pointless entity, but it throws an error in entityToPolyline.js on line 110, because the resulting polyline array is empty, so no polyline[0][0] or [0][1] values exist.
Should we catch this sort of error in this library? LibreCAD and AutoCAD have no problems opening this file.
The text was updated successfully, but these errors were encountered:
I'll add a test case for this. I think the policy should be that warnings are generated for these kind of "illegal" entities, but that it shouldn't fail
FYI there's been a fix for another issue, #21, which will change the behaviour for this case slightly.
From 3.1.1, if a "closed" polyline with one vertex is encountered, the result will be a polyline with two vertices at the same position. I believe this is better than returning an empty polyline.
I have a dxf file exported from autocad. For some reason there's like 9 lwpolylines in there that have only one vertex and the closed attribute.
{ type: 'LWPOLYLINE', vertices: [ { x: 294.598692, y: 168.66373 } ], layer: '0', colorNumber: 7, closed: true, transforms: [] }
Now I understand this could be a pointless entity, but it throws an error in entityToPolyline.js on line 110, because the resulting polyline array is empty, so no polyline[0][0] or [0][1] values exist.
Should we catch this sort of error in this library? LibreCAD and AutoCAD have no problems opening this file.
The text was updated successfully, but these errors were encountered: