Hi @DavidRutten/Grasshopper Devs,
I’ve been implementing
MIConvexHull.dll for computing 2D convex hulls. And it’s been super reliable, but I am trying to drop this dependency in favour of
Grasshopper.Kernel.Geometry.ConvexHull (for issuing concerns). This method will however occasionally return wrong/unpredictable results and is thus less reliable (assuming I’m using it as intended).
Here’s a minimal example using the compiled Grasshopper component, where I’ve isolated a set of points that produces a bad hull. Yet it will work as expected if one copy/pastes the points. Maybe some floating point rounding error is at play:
210520_ConvexHullDebug_Source_00.gh (3.1 KB)
Update: Inspecting the copied points does in fact reveal a slight decimal difference. Which explains the copy/paste mystery. Why the original points fail to produce a good hull is still a mystery (to me) though:
210520_ConvexHullDebug_Source_01.gh (8.0 KB)