Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access faces of a mesh based on their ouput colour #1156

Open
priyabiswas12 opened this issue Jul 16, 2024 · 3 comments
Open

Access faces of a mesh based on their ouput colour #1156

priyabiswas12 opened this issue Jul 16, 2024 · 3 comments

Comments

@priyabiswas12
Copy link

image

Hi there,

I have a mesh whose faces id like to access based on the output colour as seen above. For example, id like to access the traingles in blue in the above example. Is there a bulit-in method to do this? Thank you

@marcomusy
Copy link
Owner

Yes with add_ids

mesh.add_ids()
print(mesh.pointdata["PointID"])
print(mesh.pointdata["Gauss_Curvature"])

@priyabiswas12
Copy link
Author

sorry, i meant how do I retrieve the ID of the triangles shaded in blue in the above example?

@marcomusy
Copy link
Owner

You can associate data to points (vertices) or to faces (cells) in vedo.
Curvature is computed on points. You can interpolate it to triangle faces with map_points_to_cells() here.

Once you have them you can threshold your arrays with normal numpy commands.
Let me know if it is not clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants