Cleanup: improve 2D convex hull
Improve correctness, API, comments, memory usage and performance of the 2D convex hull calculation. Pre-requisite for UV packing improvements. Differential Revision: https://developer.blender.org/D16055
This commit is contained in:
@@ -1465,7 +1465,7 @@ static PyObject *M_Geometry_convex_hull_2d(PyObject *UNUSED(self), PyObject *poi
|
||||
int *index_map;
|
||||
Py_ssize_t len_ret, i;
|
||||
|
||||
index_map = MEM_mallocN(sizeof(*index_map) * len * 2, __func__);
|
||||
index_map = MEM_mallocN(sizeof(*index_map) * len, __func__);
|
||||
|
||||
/* Non Python function */
|
||||
len_ret = BLI_convexhull_2d(points, len, index_map);
|
||||
|
||||
Reference in New Issue
Block a user