Fix T52834: Polyfill2D fails with co-linear edges

This commit is contained in:
Campbell Barton 2017-09-20 04:29:04 +10:00
parent c4235356c9
commit 16355d545b
Notes: blender-bot 2023-09-13 08:48:34 +02:00
Referenced by issue #52834, Polyfill2D fails with co-linear edges (in rare case)
2 changed files with 2 additions and 5 deletions

View File

@ -411,11 +411,11 @@ static bool kdtree2d_isect_tri_recursive(
}
#define KDTREE2D_ISECT_TRI_RECURSE_NEG \
(((node->neg != KDNODE_UNSET) && (co[node->axis] > bounds[node->axis].min)) && \
(((node->neg != KDNODE_UNSET) && (co[node->axis] >= bounds[node->axis].min)) && \
(kdtree2d_isect_tri_recursive(tree, tri_index, tri_coords, tri_center, bounds, \
&tree->nodes[node->neg])))
#define KDTREE2D_ISECT_TRI_RECURSE_POS \
(((node->pos != KDNODE_UNSET) && (co[node->axis] < bounds[node->axis].max)) && \
(((node->pos != KDNODE_UNSET) && (co[node->axis] <= bounds[node->axis].max)) && \
(kdtree2d_isect_tri_recursive(tree, tri_index, tri_coords, tri_center, bounds, \
&tree->nodes[node->pos])))

View File

@ -540,7 +540,6 @@ TEST(polyfill2d, IssueT41986_axis_align)
TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
}
#if 0
/* Blender bug T52834 */
TEST(polyfill2d, IssueT52834_axis_align_co_linear)
{
@ -554,5 +553,3 @@ TEST(polyfill2d, IssueT52834_axis_align_co_linear)
TEST_POLYFILL_TEMPLATE_STATIC(poly, false);
}
#endif