70002577 I would like a method to calculate the aShape ConvexHull from a set of points

Article 70002577
Type Wish
Product Engine
Version 1102
Date Added 10/18/2024 12:00:00 AM
Fixed 11.3.1.0 (10/18/2024 12:00:00 AM)
Submitted by Peter Chanios

Summary

I would like a method to calculate the aShape ConvexHull from a set of points

Solution

In version 11.3.1 we added a new method in the gPoints class as below

summary> Calculate the outline boundaries of the points taking into consideration the aValue distance.
param name="aValue">The distance of the accepted Circumradius for the calculated triangles.
returns>a collection of gPoints that demonstrate the calculated boundary.

The bigger the value of the aValue then the outcome is similar to the Convex Hull boundary.
Smaller aValue then the boundary can start to have holes and become concave, following the data points more closely.
public vdArray <gPoints> GetOutlineBoundaryaShape(double aValue)



c# Code

 
vdArray <gPoints> bound1 = points.GetOutlineBoundaryaShape(400);
if (bound1 != null)
{
    foreach (gPoints item in bound1)
   {
        vdPolyline poly = new vdPolyline(doc, item);
        poly.PenColor.ColorIndex = 0;
        doc.Model.Entities.AddItem(poly);   
   }
}

Send comments on this topic.