Test if 2 planes are coplanar

What would be the best way to check if two planes are co-planar?

Would it be enough to check angle between planes normals?

Or there would be more cases when they coplanar?

1 Like

Yes, normal angle will be sufficient. Though you’ll have to decide whether anti-parallel normals also count as coplanarity.

Edit: yup, I was confused. Coplanarity requires that the normals are (anti)parallel within tolerance, and that the distance from the origin of each plane to the other plane is within tolerance.

Also, depends if you want to test that they are in the same physical plane then you should check origin as well as normals.

Parallel normal only means that the planes are parallel. There could be an offset between the planes and therefore not coplanar.

Draw a line between a point on each plane. If the angles between that line and the normal of each plane are 90 degrees, and the angle between the normal is 0 degrees then the planes are coplanar.

1 Like

I needed this as well! here is a small definition for checking parallelity and coplanarity!
coplanar.gh (15.6 KB)

Yes, yes, there is a simpler way:
coplanar.gh (12.2 KB)

1 Like

Thanks it seems to work, I was using this for bisectors:

    /// <summary>
    /// Be careful with colinear planes a.XAxis and a.YAxis can change
    /// </summary>
    /// <param name="a"></param>
    /// <param name="b"></param>
    /// <param name="tolerance"></param>
    /// <returns></returns>
    public static Plane BisectorPlane(Plane a, Plane b, double tolerance = 0.01)
        double angle = Vector3d.VectorAngle(a.ZAxis, b.ZAxis);

        if (angle > (1 - tolerance) * Math.PI || angle < tolerance) {
            Plane p = new Plane((a.Origin + b.Origin) * 0.5, a.XAxis, a.YAxis);
            p.Rotate(Math.PI * 0.5, p.XAxis);

            return p;


        Rhino.Geometry.Intersect.Intersection.PlanePlane(a, b, out Line lnA);
        a.Translate(a.ZAxis * 10);
        b.Translate(b.ZAxis * 10);
        Rhino.Geometry.Intersect.Intersection.PlanePlane(a, b, out Line lnB);
        return new Plane(lnA.From, lnA.To, lnB.PointAt(0.5));