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

6 次查看(过去 30 天)
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 个评论
Tingting
Tingting 2021-11-16
编辑:Tingting 2021-11-16
I had stl format. Here is my model, thank you very much!
Tingting
Tingting 2021-11-16
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!

请先登录,再进行评论。

采纳的回答

Matt J
Matt J 2021-11-16
编辑:Matt J 2021-11-18
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 个评论
Tingting
Tingting 2021-11-23
Excuse me, could you please share your code here, I don't know how to show mesh vertices .
Matt J
Matt J 2021-11-23
编辑:Matt J 2021-11-23
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)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calendar 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by