mesh refinement similar to MeshLab directly in Matlab?

9 次查看(过去 30 天)
Is there a Mesh-Refinement function in Matlab/FEX to refine triangulated mesh data?
MeshLab has this function "Remeshing, Simplification and Reconstruction --> Refine User-Defined: Refine current mesh with user defined parameters".
This increases the number of edges in the triangulated surface pretty easy and quick.
I want to get rid of the workaround via MeshLab and do this directly in Matlab. Any ideas?
Or is there a way to access MeshLab from the Matlab code?

回答(2 个)

Aditya Patil
Aditya Patil 2020-3-27
Currently this feature is not supported in MATLAB. It might be considered in any future release.
Following are possible workarounds:
  • Use the ‘Hmax’, ‘Hmin’ and ‘Hgard’ options of generateMesh as such,
mesh_Hgrad = generateMesh(model,'Hmax',20,'Hmin',0.5,'Hgrad',1.9)
  • Use the legacy [p, e, t] format and manually refine the mesh using any algorithm of your choice.

Ian Jentz
Ian Jentz 2020-10-2
编辑:Ian Jentz 2020-10-2
There is now a port of refinemesh() available for PDEModel. Like refinemesh(), it works for 2D linear triangular geometries only.
The new PDEModel compatible function is refinePDEMmesh().
This is likely how would run your problem:
create your model as a pde model
model=createpde;
proceed with your geometry definitions.
When you get to meshing, you instantiate your mesh as usuall, but then can refine the mesh on a particular face using refinePDEMmesh().
generateMesh(model);
model = refinePDEMmesh(model); % this will refine all elements within the model
FaceID = 1;
model = refinePDEMmesh(model,FaceID); % this will refine only elements within Face 1

类别

Help CenterFile Exchange 中查找有关 Geometry and Mesh 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by