Open roipoussiere opened 4 years ago
This is not reproducible in our CI (both travis and appveyor are green). I will not be able to debug this on my own. Could you try to check what is in e.g. text_flat
? The bounding box seems to choke on that according to the pasted traceback.
One of suspicious line is text_flat = Shape(text_to_brep(text, font, font_kind, size, False))
So from python-occ, I tried this:
>>> from OCC.Core.Addons import text_to_brep, Font_FA_Regular
>>> text_to_brep('foo', 'Sans', Font_FA_Regular, 0.5, False)
Font Sans initialization failed.
<Swig Object of type 'TopoDS_Shape *' at 0x7fec70863db0>
>>> text_to_brep('foo', 'Arial', Font_FA_Regular, 0.5, False)
Font Arial initialization failed.
swig/python detected a memory leak of type 'TopoDS_Shape *', no destructor found.
<Swig Object of type 'TopoDS_Shape *' at 0x7fec704ec900>
So I suppose it comes from this Font Sans initialization failed. Maybe FreeType or similar is required? Or the font themselves must be stored in a specific directory?
It would be interesting to know if the result of text_to_brep
contains anything at all. Regarding fonts probably OCC does something weird when looking them up - you could try using strace
to get to the bottom of things.
Using the latest code from the git repo (master) in cadquery (a140d1035c5ef058a5c89554ef7390873e10c370) and the python-occ's cadquery fork (
701e924
), I ranpython3 -m unittest
and all tests passes except testText: