I want to check if a Polygon is flat and 100% on a Plane that is defined by another Objects XY-Axis.

How can I do that? I am stuck here.

Hi Holgar, thanks for writing us.

With regard to your question, and following C4DS hints, I recommend, given the four points arranged in such a fashion:

A---B

| \ |

| \ |

D---C

and that to run the following steps:

- check that the dot product between vectorAB and vectorZ is 0
- check that the dot product between vectorBC and vectorZ is 0
- check that the dot product between vectorAD and vectorZ is 0
- check that the Z-value of point A matches the Z-value of your XY-aligned plane

Hope these few hints can help you to sort it out.

Cheers, Riccardo

]]>Not sure if this is the most technically and/or mathematically correct solution, but I would check each polygon's vertex normal (=cross product of the vertex with next and previous vertex). If all normals are equal then I would assume the polygon to be flat.

Additionally, when all these normals are equal to the Z axis (= cross product of X and Y axis) of your reference object, then I would assume the polygon AND flat AND 100% on the XY plane of that object.