In Mathematica, one can triangulate a mesh starting from a boundary mesh region. For example:
r = BoundaryMeshRegion[{{0, 0}, {2, 0}, {2, 1}, {1, 1}, {1, 2}, {0, 2}}, Line[{1, 2, 3, 4, 5, 6, 1}]]
m = TriangulateMesh[r, MaxCellMeasure -> 0.1]
gives a mesh m
with an L shape.
From m
, it is possible to define another mesh as:
m2 = MeshRegion[MeshCoordinates[m], MeshCells[m, 2]]
Based on my understanding for MeshRegion
, m2
should be the same as m
. Sure enough if we check the mesh primitives, they are the same:
MeshPrimitives[m2] == MeshPrimitives[m]
(* True *)
However, if we compare m
and m2
directly, we find that they are not equal:
m2==m
(* False *)
So why are they not equal?