I have a simple 2D triangle mesh embedded in a 3D space; note that it is not a BoundaryMeshRegion
, but it is a MeshRegion
. What I would like to do is quite simple: I want to upsample the mesh such that the max cell measure is some small number. If the mesh were instead a Disk, I would do this:
DiscretizeRegion[Disk[x0, r], MaxCellMeasure -> 0.001]
However, the following code simply returns the original mesh:
mesh = MeshRegion[
{{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}},
{Triangle[{1, 2, 3}], Triangle[{2, 3, 4}]}];
DiscretizeRegion[mesh, MaxCellMeasure -> 0.001]
I've seen a few similar questions on this site, but all of them involve boundary mesh objects or mesh objects that can be converted to a boundary mesh. None of these work for me.
My first intuition was that I might be able to discretize each triangle in the mesh individually then to use RegionUnion to put them all together; however, this fails both because DiscretizeRegion
yields the original triangle (though it seems to work on 2D triangles) and because the RegionUnion
seems to fail to join the triangles. Neither can you use TriangulateMesh
on a single triangle because a single triangle cannot be a BoundaryMesh
.
This seems like something that should be a simple operation: given a mesh, give me back a mesh that contains the identical set of points, but that is described using more vertices and faces. Is there an elegant way to do this in Mathematica?