good morning everyone,
I have a problem in using a python/grasshopper construct.
i have on rhinoceros the geometry of the Heydar Aliyev Center in Baku (in the project on GH i am performing optimization of only its part of the building and i am working on the second GH algorithm in the file) and my goal is to perform a flat triangular tessellation on the whole surface. i have run a cluster that takes as input the 3 sides, 3 corners and areas of each triangle and the result is the starting surface with the association with a color according to the cluster (i attach photo).
now i would like to replace each triangle of the surface with the respective middle triangle of the cluster (i am doing this with a python component by linking in input ‘vertices’, ‘faces’ and ‘clusters’). i.e. ‘vertices’ is a list of all the vertices of my triangles with their respective xyz coordinates; ‘faces’ is a list of all my triangle faces with their respective 3 vertices, ‘clusters’, obtained from the output ‘result’ of the k-means clustering component is an association of each triangle to its respective cluster.
would anyone be able to help me create these average triangles (one for each cluster) and substitute these triangles for those in the initial geometry?
i attach rhinoceros and GH files
HAC_Baku.gh (54.7 KB)
Heydar Aliyev Center Baku.3dm (16.3 MB)