# How to create surface mesh from a given 2D mesh toplogy?

I would like to convert a very easy(examplary) mesh(2D)

Needs["NDSolveFEM"]
ToElementMesh["Coordinates" -> -{{0, 0}, {1, -.5}, {0.7, .8}, {0, 1}},
"MeshElements" -> {TriangleElement[{{1, 2, 3}, {1, 3, 4}}]},
"BoundaryElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4,1}}]},
"PointElements" -> {PointElement[{{1}, {2}, {3}, \{4}}]}]["Wireframe"]


by changing the Coordinates(2D-3D) and assuming the 3Dmesh to be a boundary mesh:

ToBoundaryMesh[
"Coordinates" ->Map[{#[[1]], #[[2]], RandomReal[]} &, {{0,0}, {1, -.5}, {0.7, .8}, {0, 1}}],
"MeshElements" -> {TriangleElement[{{1, 2, 3}, {1, 3, 4}}]},
"BoundaryElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4,1}}]}
]["Wireframe"]


MMA evaluates the expression without error bur doesn't show the mesh!

What's going wrong here? Thanks

• For 3D ToBoundaryMesh[rules] syntax you should pass surface elements to "BoundaryElements" rule and set "MeshElements"->Automatic. Oct 16, 2018 at 11:09
• @Pinti Thank you, ToBoundaryMesh[ "Coordinates" -> Map[{#[[1]], #[[2]], RandomReal[]} &, {{0, 0}, {1, -.5}, {0.7, .8}, {0, 1}}], "BoundaryElements" -> {TriangleElement[{{1, 2, 3}, {1, 3, 4}}]}]["Wireframe"] works without MeshElement! Oct 16, 2018 at 11:13

ToBoundaryMesh[