Hi, I’m trying to find the lower edge of each one of these surfaces but for some reason the list item component identifies a different edge on each one. How can I fix it?
PROPOSAL BRICK WALL.gh (450.3 KB)
Hi, I’m trying to find the lower edge of each one of these surfaces but for some reason the list item component identifies a different edge on each one. How can I fix it?
Please simplify your gh file.
Help Us Help You - Grasshopper - McNeel Forum
Hi, sorry. I hope it’s okay now.
list item problem.gh (35.1 KB)
from the Deconstruct Brep you can take the Area Centroid of each brick face, sort them ascending by Z coordinate, sinchro-sort also the faces themselves, and then pick just the first one (which is the brep face with lowest Z value of its own Area Centroid, for each brick)
list item problem_inno.gh (32.7 KB)
Thank you so much. I now have another problem in the next part of the script, where not all of the lofted curves are extruded to the same height. Do you know how can I fix it and why does it happen?
list item problem_inno.gh (32.7 KB)
that is happening because the magnitude of the extrusion vector is calculated as half length of the brep-edge curve at index 4, which is not consistent because of see the previous post
if you want to get the height of each brick, and want to measure it on the geometries themselves because you wouldn’t find it anywhere else (which isn’t the case here, but still) then you could for instance measure the distance between the most distant Z coordinates of Area Centroids for each brick, similarly to the previous post:
list item problem_inno_inno.gh (33.7 KB)
Thank you so much. Could you explain why list item doesn’t identify the same edge/surface on each brep?
in order for list item to identify the very same item for all lists, items in the different lists must have the very same order
like a salmon you need to swim upstream until you see something changes in the sorting of the data
in this case, the 4 line-edges coming out directly from the Isotrim (we are at the very beginning of the definition) are all sorted like:
when those are joined together, the order is:
and is still consistent
after the offset, sdang, the order get lost:
there is also another pretty important point that maybe I should have recognized first, before typing all the above words… your initial surface is planar but oriented on an angle:
but at a certain point in the definition you are extruding stuff using basic X and Y vectors, and that produce this result:
so the stuff that you get at the end is also skewed:
there’s a mix of different things going on…
Thank you so much for you time and the amazing explanation!