Closed icemtel closed 6 years ago
UPD: in https://github.com/wo80/Triangle/issues/37 C code of Triangle 1.6 was checked and it works fine. The python bindings use the same version, so the problem has to be with python library.
code = 'a{0}'.format(max_area)
has to be replaced with
code = 'a{0:.31f}'.format(max_area)
for correct formatting. Otherwise any value below 10 ** -4 will be written in the exponential form.
I have not updated the version of the triangle C library that the python bindings use. If the problem has been fixed recently, these bindings still use the older version of the code. Maybe it would be a good idea to upgrade to the latest version when I have more time.
The problem was on my side, but some updates where made in C code indeed. See https://github.com/wo80/Triangle/issues/37#issuecomment-400224118 and https://github.com/wo80/Triangle/issues/37#issuecomment-400242694
I don't think this will be fixed any time soon, the source of the problem is probably in C code. But I want to make others aware of this problem. Using
triangulate
with parameter 'aX' (which sets a restriction on maximum triangle area) with X - a number <10**-4, the Triangle will fully ignore this argument, and maximum triangle area will be unrestricted.This is quite unexpected, because this means that algorithm will already have problems with triangles of linear size 10-3-10-2, which is not that small.
For me this prints
I could reproduce this problem with circular geometry and for objects of different size, also with additional code 'q' the problem remains.