i can’t set any property of the points in the list retrieved from ToPoint3fArray (3d also)
i had a similar problem some time ago - i guess i am overlooking something simple…
thanks
import Rhino
import scriptcontext
mesh = Rhino.Geometry.Mesh()
mesh.Vertices.Add(0.0, 0.0, 0.0)
mesh.Vertices.Add(1.0, 0.0, 0.0)
mesh.Vertices.Add(1.0, 1.0, 0.0)
mesh.Faces.AddFace(0, 1, 2)
mesh.Normals.ComputeNormals()
mesh.Compact()
vert = mesh.Vertices.ToPoint3fArray()
vert[0].Z = 1.0 # Why this does not change the Property?
print(vert[0]) # Prints 0.0 instead 1.0
scriptcontext.doc.Objects.AddMesh(mesh)