Document that tessellate_polygon() doesn't handle degenerate geometry

This 'fixes' T68554: 'API mathutils.geometry.tessellate_polygon returns
bad results sometimes' by documenting the limitations of the current
implementation.

I've also added a unit test for the function, so that any change in this
behaviour will get noticed.

No functional changes.
This commit is contained in:
2020-01-27 16:42:25 +01:00
parent 1094e56041
commit 84c537e685
2 changed files with 40 additions and 2 deletions

View File

@@ -1246,7 +1246,8 @@ PyDoc_STRVAR(M_Geometry_tessellate_polygon_doc,
".. function:: tessellate_polygon(veclist_list)\n"
"\n"
" Takes a list of polylines (each point a pair or triplet of numbers) and returns "
"the point indices for a polyline filled with triangles.\n"
"the point indices for a polyline filled with triangles. Does not handle degenerate "
"geometry (such as zero-length lines due to consecutive identical points).\n"
"\n"
" :arg veclist_list: list of polylines\n"
" :rtype: list\n");