Message Boards Message Boards

0
|
2783 Views
|
6 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Convert a ParametricPlot3D to a MeshRegion

Posted 2 years ago

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

POSTED BY: Sinval Santos
6 Replies
Posted 2 years ago

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

POSTED BY: Sinval Santos

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

DelaunayMesh[points]
POSTED BY: Takashi Yoshino
Posted 2 years ago

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

POSTED BY: Sinval Santos
Posted 2 years ago

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.

POSTED BY: Eric Rimbey
Posted 2 years ago
Attachments:
POSTED BY: Sinval Santos
Posted 2 years ago
POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract