Area 3D polygon on a plane

    static public double getSignedArea(List points, XYZ normal)
    {
        int nPoints = points.Count;

        XYZ sum = XYZ.Zero;
        for (int index = 1; index < nPoints; index++)
        {
            sum += points[index].CrossProduct(points[index - 1]);
        }
        sum += points[0].CrossProduct(points[nPoints - 1]); 

        double area = normal.DotProduct(sum);
        return -0.5 * area;
    }

To calculate the area of a 3D polygon on a plane. the normal is the plane’s normal.

Lastest update in March 2021, inital post in June 2020

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!