フィルターのクリア

Triangle clustering of .stl file

6 ビュー (過去 30 日間)
Lorenzo Pollicini
Lorenzo Pollicini 2024 年 4 月 17 日
Hello everyone,
I am asking help to the MATLAB community since my head is burning :(
So I have stored two matrices F(mx3) and N(ux3), where u is 3 times m. The first matrix F contains the triangles of an .stl file, namely it containes, in each row, the indices of the rows of matrix N where the X, Y, and Z coordinate are stored. So, for example, if F(1,:) = [1 2 3], it means that the coordinates of the vertices of the first triangle have to be found in rows 1,2, and 3 of matrix N.
Plotting the triangles we have this situation:
Now what i want to do is divide the triangles in different regions (in this case 3, but the number of regions should not be a user input).
I have been able to identify the triangles wich lies on the border writing a small algorithm that search, for each triangle, what are the adjacent triangles (looking for the common edges). All the triangles that only have 1 or 2 adjacent triangles are stored as "Border Triangles".
Here, unfortunately, is where i stop. I have thought to use some graph traversal methods to identify the regions but i am not familiar with this type of techniques.
Any suggestions?
I am not attaching any dataset since it will be to heavy and probably to much confusing.
Hoping to find an answer here :)
Thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by