Question about List vs. Tree Access - Grasshopper2024-03-29T02:04:45Zhttps://www.grasshopper3d.com/forum/topics/question-about-list-vs-tree-access?commentId=2985220%3AComment%3A1479008&x=1&feed=yes&xn_auth=noIn terms of flattening the ou…tag:www.grasshopper3d.com,2016-03-07:2985220:Comment:14790082016-03-07T15:55:05.471ZDennis Goffhttps://www.grasshopper3d.com/profile/DennisGoff567
<p>In terms of flattening the output, can that be done inside the script?I ask because getting this list wouldn't be the end of the script. Next step would be to determine all of the possible heights in heightList (like a hashset) and group all of the 4 point lists based on which height they fall into. So for each value in the hashset of heights, there would be a list of all the groups of 4 points whose first point had that particular Z value. so say if those 4 points represented panels on a…</p>
<p>In terms of flattening the output, can that be done inside the script?I ask because getting this list wouldn't be the end of the script. Next step would be to determine all of the possible heights in heightList (like a hashset) and group all of the 4 point lists based on which height they fall into. So for each value in the hashset of heights, there would be a list of all the groups of 4 points whose first point had that particular Z value. so say if those 4 points represented panels on a building, you would wind up with an output tree for every floor of the building.</p>
<p></p>
<p>Also, I think that's the first thing I've "taught" someone on here :P</p> what's wrong with flattening…tag:www.grasshopper3d.com,2016-03-07:2985220:Comment:14787632016-03-07T04:56:08.145ZAndrew Heumannhttps://www.grasshopper3d.com/profile/AndrewHeumann
<p>what's wrong with flattening the output? Without going the tree access route I am pretty sure this is simply what you're going to get. Also - why not just say "A = x[0][2];" and skip creating a list that's only holding one item? it should be the same result. </p>
<p></p>
<p>side note - had no idea you could treat point3ds as arrays and access their z with a [2]! thanks for teaching me that :D</p>
<p>what's wrong with flattening the output? Without going the tree access route I am pretty sure this is simply what you're going to get. Also - why not just say "A = x[0][2];" and skip creating a list that's only holding one item? it should be the same result. </p>
<p></p>
<p>side note - had no idea you could treat point3ds as arrays and access their z with a [2]! thanks for teaching me that :D</p> Kludge: flatten the C# input…tag:www.grasshopper3d.com,2016-03-02:2985220:Comment:14751772016-03-02T00:16:35.977ZNik Willmorehttps://www.grasshopper3d.com/profile/NikFromNYC
<p>Kludge: flatten the C# input and use appropriate loops and list indices to access z values?</p>
<p>Kludge: flatten the C# input and use appropriate loops and list indices to access z values?</p>