i know we can right click the LC to use flatten.but, this time i need do the same thing in C# …

Thankyou!

Simplify.

Simplify won’t work in that case when it has no other branches to simplify against, a common complaint about simplify.

List class has not simplify in C#…

Use IGH_Structure

https://developer.rhino3d.com/wip/api/grasshopper/html/M_Grasshopper_Kernel_Data_IGH_Structure_Simplify.htm

But again that won’t do it, the description is “Simplify the data structure by removing path indices shared by all branches.” In your case there is no other branches to compare to"

1 Like

thankyou ,but it looks too difficult to me!

i use a structure.flatten(ghpath)to flatten a tree.it works.