How to setup radius or nbr of neighbor pt for curvature calcuation ( mesh.Comput_Curvature) #1191
Unanswered
DRLing2021
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi, soory for the late reply ! unfortunately I don't think there is an option to specify the radius in vtk/vedo. 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(l) # remove duplicates
ids = list(ids)
vtxs = s.vertices[ids]
# create a red point at the selected point's location
apt = Point(s.vertices[index]).c("red5").ps(15)
cpts = Points(vtxs).c("blue5").ps(10)
# show the sphere, the selected point, and the connected vertices
show(s, apt, cpts) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our project, curvature, gaussan and mean, are used to identify concave pts from convex pts. We tried several uitilities and found vedo's performance is satisfying. In fact, the curvation results relate to neighbour pts which is controled by search radius or nbr of neighbour pts. Unfortunately we could not find the setting of radius for Compute_Curvature() function.
Can anyone help to tell what is default value setting for the radius or nbr neighbour pts in vedo curvature calcuation? How to change them when needed? The function we used is: mesh.compute_curvature().
Beta Was this translation helpful? Give feedback.
All reactions