Cut and filter meshes.gh (5.8 MB)
Hi,
i try to trim meshes, with a brep. After that i want to filter out the biggest one.
The way for that i found on google dosnt work, somehow and I dont know why.
The weirdest thing is that it works for one of the meshes, even though one of the components is red, but the exact same way did not work for the other side.
Can someone explain what i´m doing wrong?
sorting one two lists works, when both have the same length.
so you did flatten in the wrong place. AND you did not sort the meshes. (but tried to sort the vertices.
I sorted the meshes according to their vertexnumbers (each mesh has a vertexnumber - so both lists have the same length)
Thank you!
Just some easy fixes. This helps me to understand the logic of this operation.
the “K” in the sorting stands for Key.
using the points as keys -as you did- makes gh taking the punts as numbers (to get a number it takes the distance of the point to the origin) so sorting points as keys produces numbers you dont
want . using these as indices transforms them again from floats to integer.
since the wraping is on by defaut in the list item component you will get somthing even if the number can be much higher than your itemcount.
but rather random