Borrar filtros
Borrar filtros

Find a plane that is tangent to a part of the 3D model

2 visualizaciones (últimos 30 días)
Tingting
Tingting el 16 de Nov. de 2021
Editada: Matt J el 23 de Nov. de 2021
Hello!
I have got a 3D model and I want to find a 2D plane that is tangent to the bottom of my 3D model. The bottom is made up of three sphere-like structures spliced together. I want to know how to find such a plane to make it tangent to the bottom? There should be three tangent points.
The following figure attaches my 3D model and schematic diagram
  3 comentarios
Tingting
Tingting el 16 de Nov. de 2021
Editada: Tingting el 16 de Nov. de 2021
I had stl format. Here is my model, thank you very much!
Tingting
Tingting el 16 de Nov. de 2021
Let me explain in detail. In my previous work, I have obtained the 3D model of the aortic root of the human body through automatic segmentation of the neural network. This plane is called the aortic annulus plane. My task is to search for this plane to obtain the aortic annulus (the circle obtained by three tangent points) diameter. Thank you for your attention!

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 16 de Nov. de 2021
Editada: Matt J el 18 de Nov. de 2021
Obtain all the mesh vertices from your stl file in V. Then, compute the facet areas and normals of the convex hull with,
k=convhull(V);
dVa=V(k(:,2),:)-V(k(:,1),:);
dVb=V(k(:,3),:)-V(k(:,1),:);
C=cross(dVa,dVb);
Areas=vecnorm(C,2,2); %facet areas
Normals=normalize(C,2,'norm'); %facet normals
From your diagram, your three spheres look to be within about 10 degrees of the direction vector d=[2 0 1]/sqrt(3), so,
d=[2 0 1]'/sqrt(3);
subset=find(acosd(abs(Normals*d))<30);
[~,i]=max(Areas(subset));
kp=k(subset(i),:);
Vp=V(kp,:); %The 3 annulus vertices
  9 comentarios
Tingting
Tingting el 23 de Nov. de 2021
Excuse me, could you please share your code here, I don't know how to show mesh vertices .
Matt J
Matt J el 23 de Nov. de 2021
Editada: Matt J el 23 de Nov. de 2021
I just used scatter3. You could have used tetramesh() or plot3() or anything you like.
load meshvertices
XYZ=num2cell(V,1)';
scatter3(XYZ{:},'filled','MarkerEdgeColor','none','MarkerFaceAlpha',0.1)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by