Mesh assigned values

Hi, everyone.
I’ve created a mesh, and want to assign values to each point.
I am little confused about why my code couldn’t work :thinking:.

MESHColor.gh (11.3 KB)
KR
Thomson

 List<double> randomMY = new List<double>();

    /// double[] LDrandomMY;
    Random random = new Random();
    for (int i = 0; i <= 121; i++)
    {
      double figure = random.Next(20, 40);
      randomMY.Add(figure);
    }
    LDrandomMY = randomMY;
1 Like

I am a little late.

You did not Internalise the mesh, so perhaps this is what you expect?

MESHColor_Re.gh (13.3 KB)

1 Like

Hi, Lin
It seems something still goes wrong :face_with_monocle:.


MESHColor-2.gh (14.8 KB)

KR
Thomson

I open your gh file.It is OK

Hi @11159 @Tao_Lin ,

 It's amazing! :+1:
 Thank you all, guys.

KR
Thomson