Convert a ParametricPlot3D to a MeshRegion

I’m trying to convert a ParametricPlot3D into a MeshRegion, but the result isn’t perfect. Attached is a notebook.

I’m grateful for any help.
Sinval

If you just want to get a MeshRegion, the easiest way is:

DiscretizeGraphics[pl]

If you specifically want a MeshRegion of a sphere:

DiscretizeRegion[Sphere[]]

Thanks Eric for your attention.
I’ve already used these two functions you suggested. I’m trying to create meshes, from several functions, that will be used in the finite element method, but failures occur as shown in the attached Notebook. That’s why I tried to find another way to create meshes from functions like Plot3D or ParametricPlot3D.
Regards.
Sinval

Sphere.nb (229 KB)

As far as I can tell, the error occurs with ToElementMesh~after~ToBoundaryMesh after you try to use DiscretizeGraphics on a ParametricPlot3D. There is no error if you use ToElementMesh~after~ToBoundaryMesh after using DiscretizeGraphics on a Sphere or a Ball. Your comment implies that you switched to using ParametricPlot3D to avoid errors, so I’m confused.

But, I’m also inferring from your comment that you’re not really interested in Spheres. You’re trying to solve the problem for more general regions. I don’t really have an explanation for why the error occurs when using a region created by applying DiscretizeGraphics to the ParametricPlot3D for a sphere. So, I certainly have no idea why it’s failing for whatever your real regions are. I also don’t really know what the expected outcome is after applying the composition of ToElementMesh and ToBoundaryMesh. They each work in isolation (and produce different results, for whatever that’s worth).

My suggestion would be to find the simplest example of a ParametricPlot3D that actually does work. Then start altering it in the direction you want until something triggers a failure. That might give you a clue for how to work around this. Alternatively, if we knew what your objective was, maybe there’s a path to get there that avoids this issue altogether.

Also, if we had known that the problem actually occured with functions in the NDSolve’FEM’ package, maybe that would have triggered something for someone that has experience with that package. Your original post made it seem like you were having problems with plain ol’ MeshRegions. So, we’ve been chasing a red herring here.

Thanks again for the suggestion Eric. I will keep trying.

How about using only points and DelaunayMesh function?
This error seems to occur since some polygons are not coplanar.

DelaunayMesh[points]

Thanks for your tip Takashi. It also works with the ConvexHullMesh[points] function.
Regards,
sinval