From 84c537e68528177ef982479f5884af07cec322b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 27 Jan 2020 16:42:25 +0100 Subject: 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. --- source/blender/python/mathutils/mathutils_geometry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/python') 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"); -- cgit v1.2.3