I need to go through a specific level and make “groups” of walls (G1 is a group, G2 another, etc.) and specify the names of each wall by group (P1 and P2 are from G1, P3 and P4 are from G2, etc.), as in the image below.
@Daan so, I decide to create something that checks each vertex of the element and in each vertex check if there is any element nearby. If so, add it to a list. Checking all vertex from a one wall, pass for other wall and repeate the process.
My code will be composed with these steps:
1.Go through for levels and take all elements by category (in this case, walls). Return the surfaces them and take the max point Z each surface in the list, because in the max point is the surface wich I want work. This step is in the image.
If I know the max point and wich surface it is from, I take this surface and find each corner.
I do the verification and add a list, as an explanation above. Then, I will have lists, with the walls, inside other list. Each “sublists” will be a group.
Right now, I’m in the first stage. My question is how I go through for the elements from a list and check wich have the max point Z (so return them). In the image, I find the coordenates from each surface and the max point each them. However, I want return the points that have this max point Z. You can help me in this step?