Equalize lengths of lines in a space-frame

Hello, I want to equalize the line lengths…Keeping approximate same shape. I have used kangaroo 2 for achieving this by applying line and equalize forces but, I am not getting any results. Can anyone help me in achieving these goals? I am attaching gh file . Thank you !

equalise.gh (416.6 KB)

Compare these two case scenarios… You’ll need Weaverbird plugin.

Equalize_re.gh (831.5 KB)

Thank you I think I was missing the lengths of final lines which you calculated through logi of average. But after analysing both scripts I realised such shapes not be produced in real world without having idvidual unique length members in the lattice. I think to achieve a shape like that a equal length option ont work. Even I tried the script on a semi shpere and there also all members coudnt be of same length. But Thank you very much for giving that script, it helped a lot.