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
For the DXF below, the very simple code taken from ezdxf docs never ends even though the DXF has only one entity (I intentionally left only one that there is an issue for).
Information and data needed to reproduce the error:
A simplified Python script which triggers the error.
from ezdxf import readfile
from ezdxf.addons.drawing import matplotlib
drawing = readfile('buggy_mtext.dxf')
matplotlib.qsave(drawing.modelspace(), 'test.png')
You may find a problematic DXF in an archive here: buggy_mtext.zip
Expected behaviour: ezdxf exports an image, or throws an exception that the export is not possible.
Important: after some personal investigation, I am pretty sure that the loop in ezdxf/tools/text_layout.py, line 960 becomes infinitive for this plan, but to be honest have no guess how to fix it.
Thanks a lot for taking this issue into account, and do not hesitate to let me know if you need more details about this bug! :)
The text was updated successfully, but these errors were encountered:
The fix solves the infinite loop, but the rendering of the MLEADER content (a MTEXT entity) does not look like expected.
The current implementation of the MTEXT renderer can handle tabulators just in some rare cases, therefore tabulators should be avoided or at least the text after the tabulator should fit into the line. Keep it simple!
@mozman Ok sounds really great, thanks for you quick feedback!🙂
To be honest with you I'm not an author of the plan where this entity appears, so any unexpected export result is acceptable. The most important is that it isn't infinitive no more🤩
For the DXF below, the very simple code taken from
ezdxf
docs never ends even though the DXF has only one entity (I intentionally left only one that there is an issue for).Information and data needed to reproduce the error:
ezdxf
version tested: 0.18.1, and the following project state: https://github.com/mozman/ezdxf/tree/d4084178c1b43f452188f9f05ad5c45df19cdae5Expected behaviour: ezdxf exports an image, or throws an exception that the export is not possible.
Important: after some personal investigation, I am pretty sure that the loop in ezdxf/tools/text_layout.py, line 960 becomes infinitive for this plan, but to be honest have no guess how to fix it.
Thanks a lot for taking this issue into account, and do not hesitate to let me know if you need more details about this bug! :)
The text was updated successfully, but these errors were encountered: