def foo(mesh,dist,depth,iter):
second_mesh=Rhino.Geometry.Mesh()
vec_normal=System.Collections.Generic.List[Rhino.Geometry.Vector3d]()
re_pts=System.Collections.Generic.List[Rhino.Geometry.Point3d]()
for i in mesh.vec_normal:
vec_normal.Add(Rhino.Geometry.Vector3d(i))
for i in range(len(mesh.Vertices)):
temp_point=Rhino.Geometry.Point3d.Add(Rhino.Geometry.Point3d(mesh.Vertices[i]),vec_normal[i])
re_pts.Add(temp_point)
second_mesh.Vertices.Add(temp_point)
print(type(mesh.Facevec_normal))
for i in range(len(mesh.Faces)):
if mesh.Faces[i].IsQuad:
ve1 = mesh.Faces[i].A
ve2 = mesh.Faces[i].B
pt_1 = re_pts[ve1]
pt_2 = re_pts[ve2]
mid_1 = Rhino.Geometry.Point3d.Divide(Rhino.Geometry.Point3d.Add(pt_1,pt_2),2)
mid_1= Rhino.Geometry.Point3d.Add(mid_1,Rhino.Geometry.Vector3d(mesh.Facevec_normal[i]))
this throws the error:
- Exception occured in handler:
No constructor matches given arguments: (<class ‘Rhino.Geometry.Collections.MeshFaceNormalList’>)
File “.\app.py”, line 59, in mesh_ex
mid_5= Rhino.Geometry.Point3d.Add(mid_5,Rhino.Geometry.Vector3d(mesh.FaceNormals))
but what is wrong here? because I tried itin GHPython and it works perfect but now in HOPS it is throwing an error.