Find nodes in a mesh
Show older comments
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?

Answers (1)
darova
on 29 Mar 2019
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()
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!