What is the definition of planarity?

Hello Guys

please tell me how to correctly determine planarity for 4,5,6 squares and so on?
maybe some literature?
all the same, how is it more correct to obtain the absolute value of the deviation or the relative value for planarity?
now I am guided by the technological requirements for permissible deviation from the plane?
and what are the general requirements for deviations from 0 planarity?
am I now defining with a node from kangaroo 2 or its self-written definition?

at the same time, did you find ways to deviate both from the mean plane or deviate from a plane built on 3 points?

the kangaroo 2 node has a problem; it n-gonal meshes on triangles.

planarity.gh (22.5 KB)

For a Quad Mesh Face (or a 4 node Polyline) Planarity is the min distance between the diagonals (ALWAYS compare that to some realistic small value: i.e. not zero).

For any collection of Pts Planarity is the max prox distance to a fitted Plane.