diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-01-27 18:42:25 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-01-27 18:42:25 +0300 |
commit | 84c537e68528177ef982479f5884af07cec322b9 (patch) | |
tree | 25f7f99d75db929e688ea401ebf11d8016c1c637 /source | |
parent | 1094e560413d38e9834ae563ef248f898cb8b201 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/mathutils/mathutils_geometry.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index fcb6a77bf36..859ece61ace 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -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"); |