Tetrahedron mesh from point cloud

13 次查看(过去 30 天)
I have a point cloud in 3D space that I would like to mesh with simple 4-node tetrahedrons. Ideally, this would be done via a function similar to delaunay(), however, I cannot find such a function in the documentation. The closest is generateMesh(), but this doesn't work for me because my point cloud doesn't correspond to a CAD geometry. What solutions, if any, exist to help overcome this obstacle? My thanks for any clarification that can be provided!

采纳的回答

Nathaniel Wood
Nathaniel Wood 2022-2-2
I'm closing this question because it appears that I misread the documentation for delaunay(). It will return a tetrahedral mesh if you give it a point cloud in 3D space.

更多回答(1 个)

KSSV
KSSV 2022-1-31
  3 个评论
KSSV
KSSV 2022-1-31
.stl file writes a mesh into the file. You need not to generate mesh again.
Nathaniel Wood
Nathaniel Wood 2022-1-31
I'm sorry for being slow on the uptake, but I don't understand how to get the mesh data from the .stl file. Here's a simple test script I wrote with an elementary point cloud
%%% generate points
[x,y,z] = ndgrid(1:20:100,1:20:100,1:20:100);
x=x(:); y=y(:); z=z(:);
%%% enforce uniqueness of points and plot
points=[x,y,z];
points=sortrows(points);
points=unique(points,'rows');
x=points(:,1); y=points(:,2); z=points(:,3);
figure;
scatter3(x,y,z,'.')
%%% compute convex hull and export triangulation
k=convhull(x,y,z);
figure;
trisurf(k,x,y,z);
tr=triangulation(k,[x,y,z]);
stlwrite(tr,'temp.stl');
%%% import .stl file and extract tetrahedral mesh data
model=createpde;
importGeometry(model,'temp.stl');
tet_mesh=generateMesh(model); %necessary?
The geometry information extracted from the .stl file doesn't include the full mesh data, it's just the faces and vertices associated with the brick's boundary. It seems that MATLAB's .stl import routines are "smart" enough to only import the convex hull of the point cloud contained in the .stl, not the full mesh data. Additionally, I thought .stl files only stored triangulations of their point clouds, not 3D tetrahedral meshes. From my inexperienced perspective, I still don't understand why tetrahedralization isn't a readily-available extension of the existing triangulation functions. Is this a substantially harder problem, or one that doesn't have a guaranteed solution (unlike triangulation)?

请先登录,再进行评论。

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by