# HG changeset patch # User John W. Eaton # Date 1357229800 18000 # Node ID 065bc79443350b77397102c9febb5dab85a61c1a # Parent 878623ca15e175010398b17d111461380b977f1e fix incorrect results for convhulln in some cases (bug #38013) * convhulln.cc (Fconvhulln): Skip check for non-simplicial facets for 2-dimensional hull. New test. diff -r 878623ca15e1 -r 065bc7944335 src/DLD-FUNCTIONS/convhulln.cc --- a/src/DLD-FUNCTIONS/convhulln.cc Wed Jan 02 11:26:38 2013 -0500 +++ b/src/DLD-FUNCTIONS/convhulln.cc Thu Jan 03 11:16:40 2013 -0500 @@ -179,7 +179,7 @@ { octave_idx_type j = 0; - if (! nonsimp_seen && ! facet->simplicial) + if (! (nonsimp_seen || facet->simplicial || qh hull_dim == 2)) { nonsimp_seen = true; @@ -313,4 +313,9 @@ %! h = sortrows (sort (h, 2), [1 2 3]); %! assert (h, [1 2 3;1 2 4; 1 3 4; 2 3 4]); %! assert (v, 8/3, 10*eps); + +%!testif HAVE_QHULL +%! triangle=[0 0; 1 1; 1 0; 1 2]; +%! h = convhulln (triangle); +%! assert (size (h), [3 2]); */