Extracting information from 3D model - .stl file management on matlab

13 ビュー (過去 30 日間)
Juan Pablo Guamn Bernal
Juan Pablo Guamn Bernal 2021 年 5 月 25 日
Hi everyone
I started reading a .stl file, I alredy know how to calculate volumen and superficial area from it, but I need to extract even more info, cause it will be input data for a convutional NN. So, I need to extract data as, minimun distance between surfaces, minimum radius, maximum distance between surfaces, and so on. To do so, I used triangulation, and with some features, I was able to obtain the normal vector of the surfaces, also the X,Y,Z coordinates fo the center of each triangle, I thought that I will be able to find the minimun distance and maximum, using norm(b-a), to find all distances between trangle centers, but did not came out I as expected. This is the code that I made for this. I will appreciate any help or idea to achieve this goal, thanks
TR = triangulation(fv.ConnectivityList,fv.Points)
E = edges(TR)
startVert = TR.Points(1,:);
endVert = TR.Points([2 3 5],:);
F = faceNormal(TR)
P = incenter(TR)
for i = 1:size(P,1);
a = P(i,:);
b = P((i+1),:);
d = norm(b-a);
dis(i) = d;
dis;
end
Min_dis = min(dis);
Min_dis
  2 件のコメント
darova
darova 2021 年 5 月 25 日
Can you show the geometry?
Juan Pablo Guamn Bernal
Juan Pablo Guamn Bernal 2021 年 5 月 25 日
編集済み: darova 2021 年 5 月 26 日
Yes, this is an image of the part, but I will need to do the same process with random geometries.

サインインしてコメントする。

採用された回答

darova
darova 2021 年 5 月 26 日
Try this link: Surface Curvature
Can you just analyze edge length to find minimum/maximum distances?
  1 件のコメント
Juan Pablo Guamn Bernal
Juan Pablo Guamn Bernal 2021 年 5 月 26 日
great idea, thaks, I will try it and let you know if it works

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSTL (STereoLithography) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by