Closed mutigozel closed 5 years ago
whoops, that shouldn't have happened. I fixed it now and pushed an update to nuget (1.1.19.1019) and to this repo (https://github.com/DesignEngrLab/MIConvexHull/commit/d5f3a77489f7f6c29ad954b29bfeaf8e4f4b646b). I fear that you may not be satisfied with the answer however. As you likely know the correct answer to your problem is 16 vertices, but MIConvexhull returns 17. this is because the current implementation does not produce either the maximal or minimal set of vertices - it is more based on speed. In your problem, all but one of the 81 vertices is on the convex hull, but many points like: {1,3,1,2} would be along some hyper-edge - and not a corner like {1,1,1,1}. The minimal set would remove these side points. The maximal set would include these. And there are different used cases in which you would want one or the over. Right now, it's all about speed. This is because it has been derived for uses in geometry where the shape is need - not necessarily the membership decision about each vertex.
Well, this is becoming a long-winded answer but I hope it helps you understand where we're coming from. Until we get around to having an input setting to switch between: maximal, minimal, or fast; perhaps you can post process the convex hull to find any vertices that are along edges.
Thanks @micampbell . It is solved.
Hi,
The program below is throwing exception like:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at MIConvexHull.MathHelper.CalculateFacePlane(ConvexFaceInternal face, Double[] center) in C:\Users\Muti\Desktop\MIConvexHull\MIConvexHull.NET Standard\ConvexHull\MathHelper.cs:line 118
`using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace ConsoleApp1 { class Program { public static class Tools { public static int DBG = 0; }
} `