I’m trying to use Rhino.Geometry.Collections.MeshFaceList.AdjactedFaces method which asks for self: MeshFaceList, faceIndex: int as input. The script editor outputs that AdjactedFaces method takes exactly 2 arguments, but I can’t get over with MeshFaceList type.
Mesh created by Rhino.Geometry.Mesh.Vertices.Add() and Rhino.Geometry.Mesh.Faces.AddFace() used in AdjactedFaces outputs:
So this is what happens. V and F are list access; A, B and C are item access. All with no type hints. Same error with F instead of mesh as an argument for AdjactedFaces.
import Rhino as rh
import rhinoscriptsyntax as rs
mesh = rh.Geometry.Mesh()
for i in range(0, len(V)):
mesh.Vertices.Add(V[i])
for i in range(0, len(F)):
mesh.Faces.AddFace(A, B, C)
mesh.Normals.ComputeNormals()
mesh.Compact()
rh.Geometry.Collections.MeshFaceList.AdjacentFaces(F, 6)
Create a python component with a single input named mesh and give it a typehint of Mesh. Wire the Mesh component output directly to this new python component. Inside the python component, write