Is there a way to call 3D convex hull from C# code?

Basically I want to get the mesh from a set of points to analyse volume and sections. Any ideas how to call this or if there is component that I can reference?

Hi @ankere
You can use Quickhull from Dale’s Polyhedra plug-in as shown here

2 Likes

Thanks @DanielPiker, that helped a lot.
In the end I used this code:

and found the component name from here:

 var com = rd.Components.FindComponent("Meshedit2000_3DConvexHull");

    object[] args = new object[] {x};
    string[] warnings;

    if (com != null)
    {
      var results = com.Evaluate(args, false, out warnings);
      A = results[0];
    }

You could also implement MIConvexHull directly, which is what MeshEdit implements I believe. Here’s a GHPython example, should be simple to port to C#:

2 Likes

Thanks, I was looking into that and even cloned the repo from github but for now I’ll stick with the fastest solution until I have time to properly do it.

1 Like