Sort keys from maximum to minimum - Grasshopper2024-03-28T11:25:46Zhttps://www.grasshopper3d.com/forum/topics/sort-keys-from-maximum-to-minimum?commentId=2985220%3AComment%3A1843657&x=1&feed=yes&xn_auth=noThank you tag:www.grasshopper3d.com,2017-10-30:2985220:Comment:18436572017-10-30T15:57:26.937ZF Lhttps://www.grasshopper3d.com/profile/FlorenciaVela
<p>Thank you </p>
<p>Thank you </p> Thank you very muchtag:www.grasshopper3d.com,2017-10-30:2985220:Comment:18435572017-10-30T15:57:11.591ZF Lhttps://www.grasshopper3d.com/profile/FlorenciaVela
<p>Thank you very much</p>
<p>Thank you very much</p> Google translation (pretty go…tag:www.grasshopper3d.com,2017-10-30:2985220:Comment:18436172017-10-30T10:53:58.379ZJoseph Osterhttps://www.grasshopper3d.com/profile/JosephOster
<p>Google translation (pretty good!):</p>
<blockquote><p>Hi, the usual thing is to use Sort List and make it reverse its outputs.<br></br>The problem here is the data structure that receives the Sort List, you are giving trees instead of lists. Each branch of the tree is a list that in your case only contains one element, then the Sort List understands that you want it to be executed once for each list / branch of the tree, and being of a single element, there is nothing to order. It can be solved…</p>
</blockquote>
<p>Google translation (pretty good!):</p>
<blockquote><p>Hi, the usual thing is to use Sort List and make it reverse its outputs.<br/>The problem here is the data structure that receives the Sort List, you are giving trees instead of lists. Each branch of the tree is a list that in your case only contains one element, then the Sort List understands that you want it to be executed once for each list / branch of the tree, and being of a single element, there is nothing to order. It can be solved by restructuring the data, but for that you need to know how you should organize them.<br/>Do you want to sort all the data? or order subsets of that data?<br/>For the first one, you must flatten the tree to move from your current structure {A; B} to {0}, making each element of each branch go to the same list. You can do this using flatten (right click> Flatten) in the Geometry component.<br/>For the second, moving from {A; B} to {A}, you must use the Shift Paths component.<br/>And in the outputs of the Short List, do the reverse.</p>
</blockquote> Hola, lo habitual es usar Sor…tag:www.grasshopper3d.com,2017-10-29:2985220:Comment:18432022017-10-29T23:47:41.213ZDaniel González Abaldehttps://www.grasshopper3d.com/profile/DaniAbalde
<p>Hola, lo habitual es usar Sort List y hacerle reverse a sus outputs.</p>
<p>El problema aquí es la estructura de datos que recibe el Sort List, le estas dando árboles en lugar de listas. Cada rama del arbol es una lista que en tu caso solo contiene un elemento, entonces el Sort List entiende que quieres que se ejecute una vez por cada lista/rama del árbol, y al ser de un solo elemento, no hay nada que ordenar. Se puede resolver reestructurando los datos, pero para eso es necesario saber cómo…</p>
<p>Hola, lo habitual es usar Sort List y hacerle reverse a sus outputs.</p>
<p>El problema aquí es la estructura de datos que recibe el Sort List, le estas dando árboles en lugar de listas. Cada rama del arbol es una lista que en tu caso solo contiene un elemento, entonces el Sort List entiende que quieres que se ejecute una vez por cada lista/rama del árbol, y al ser de un solo elemento, no hay nada que ordenar. Se puede resolver reestructurando los datos, pero para eso es necesario saber cómo debes organizarlos.</p>
<p>Quieres ordenar todos los datos? o ordenar subconjuntos de esos datos?</p>
<p>Para el primero, debes aplanar el árbol para pasar de tu estructura actual {A;B} a {0}, haciendo que cada elemento de cada rama pase a la misma lista. Puedes hacerlo utilizando flatten (click derecho> Flatten) en el componente Geometry.</p>
<p>Para el segundo, pasando de {A;B} a {A}, debes usar el componente Shift Paths.</p>
<p>Y en las salidas del Short List, hacerle el reverse.</p> Flatten both keys and values…tag:www.grasshopper3d.com,2017-10-29:2985220:Comment:18432782017-10-29T23:37:02.743ZChapulin Coloradohttps://www.grasshopper3d.com/profile/ChapulinColorado
<p>Flatten both keys and values like this</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769337900?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769337900?profile=RESIZE_1024x1024" class="align-full" width="721"/></a></p>
<p>Flatten both keys and values like this</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769337900?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769337900?profile=RESIZE_1024x1024" class="align-full" width="721"/></a></p>