Tetrahedron mesh from point cloud

14 visualizaciones (últimos 30 días)
Nathaniel Wood
Nathaniel Wood el 31 de En. de 2022
Respondida: Nathaniel Wood el 2 de Feb. de 2022
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!

Respuesta aceptada

Nathaniel Wood
Nathaniel Wood el 2 de Feb. de 2022
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.

Más respuestas (1)

KSSV
KSSV el 31 de En. de 2022
  3 comentarios
KSSV
KSSV el 31 de En. de 2022
.stl file writes a mesh into the file. You need not to generate mesh again.
Nathaniel Wood
Nathaniel Wood el 31 de En. de 2022
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)?

Iniciar sesión para comentar.

Categorías

Más información sobre Triangulation Representation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by