Find nodes in a mesh

3 次查看(过去 30 天)
Cristiana Abilheira
回答: darova 2019-3-29
Hello everyone, I hope someone can help me on this
I have a STL file imported, with it I created a triangulated mesh. Like the one in the image.
What I need is to find the nodes in the blue square ( -200<x<200& -200<y<200).I guess this information is in the big array of vertex from where I created this mesh. Then I need to know not only the nodes but the triangles that are in the area. I also have an array with "faces" information...
How can I get this?
matanswers.PNG

回答(1 个)

darova
darova 2019-3-29
if matrix with faces/triangles like [1 2 3; 4 5 6; 7 8 9 ....
[~, indv] = find( -200<x & x<200 & -200<y & y<200 ); % indices of X and Y in square
indf = ceil(indv/3); % indices of faces
see also inpolygon()

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by