Skip to content

How to setup radius or nbr of neighbor pt for curvature calcuation ( mesh.Comput_Curvature) #1191

Answered by marcomusy
DRLing2021 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, soory for the late reply ! unfortunately I don't think there is an option to specify the radius in vtk/vedo.
For relatively small meshes you may consider averaging over connected vertices, eg:

from vedo import *

# s = Sphere(res=150).wireframe().c("yellow")
s = Mesh(dataurl+"teddy.vtk").subdivide()
s.compute_curvature()
s.cmap("coolwarm", "Gauss_Curvature", vmin=-10, vmax=10).add_scalarbar()

# select one point on the sphere using its index
index = 150

# recursively find connected vertices
ids = {index}
for _ in range(5):
    l = []
    # todo: subtract the already found vertices
    print(len(ids), "vertices found")
    for i in ids:
        l += s.connected_vertices(i)
    ids = set(

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DRLing2021
Comment options

Answer selected by marcomusy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants