planarity_score

m3sh.traits.planarity_score(face, denom=0.0)[source]

Planarity score of skew quadrilateral.

Distance of diagonals. Can be normalized to make the measure scale independent.

Parameters:
  • face (array_like, shape (4, 3)) – Vertex coordinate array.

  • denom (float, optional) – Zero divides by mean edge length.

Returns:

Planarity score. Can result in inf and nan values in case of flipped or degenerate quadrilaterals.

Return type:

float