import Rhino
def test_subdvertex_faceat():
filter = Rhino.DocObjects.ObjectType.MeshVertex
rc, objref = Rhino.Input.RhinoGet.GetOneObject("Select subd vertex", False, filter)
if rc == Rhino.Commands.Result.Success:
subd = objref.SubD()
if subd:
ci = objref.GeometryComponentIndex
vtx = subd.Vertices.Find(ci.Index)
if vtx:
for fi in range(0, vtx.FaceCount):
face = vtx.FaceAt(fi)
if face:
print(face)
if __name__ == "__main__":
test_subdvertex_faceat()
Thank you @dale. I can see the highlight now but have no idea how to get the SubDVertex.Id from a Grip ? Using your example code above, if i select a grip when points are On, i tried to detect that and query for:
objref.GeometryComponentIndex.ComponentIndexType
which returns an “InvalidType”. If i try to get the index of the grip like this:
objref.GeometryComponentIndex.Index
it is always -1. Is there a reason why there is no dedicated filter vor SubDVertex ?