Finding the center of multiple surfaces

Hi,

I am wondering how to find the average center of all of these surfaces together. Merging the surfaces together isn’t an option as there is a 1mm gap in between these tiles. Something like the AreaCentroid command in Rhino.

Thanks in advance!

Create a bounding box for the selected surface. Then generate the AreaCentroid of the newly created bounding box. That will give you the average center of those surfaces.

Great, Thank you!

Use Average with all the surface area centroids (points) as input.

P.S. I don’t think @shaique.uddin is correct. Bounding Box (Union Box) of all surfaces will include the area of the gap at the bottom-right.

2 Likes

This isn’t correct.

I would do a Region Union then get area of that shape. It is slightly more accurate than by center averaging.


Realized I missed the screenshot of the surfaces and already deleted the file. The input to surface param is just surfaces laid in brick pattern like the screenshot.

1 Like

But in the OP, he said:

Merging the surfaces together isn’t an option as there is a 1mm gap in between these tiles.

I guess it needs a weighted average?

Fair enough, then it will need some weighting such as with the weighted average component I believe or offset everything 1mm and do the region method, I think the gap being included wouldn’t matter in this case.

Thank you to everyone! Shaqiue’s way worked for my basic application. I will follow yours and Joseph’s solution for accuracy in the future. Cheers

I don’t know if this is a valid comparison between Avr and Wav? (green group) But the two points look pretty close.


avr_area_2021_Jul8a.gh (11.5 KB)

@shaique.uddin’s method (yellow point), if I understand it correctly, is substantially different.


avr_area_2021_Jul8b.gh (14.3 KB)

2 Likes

@Joseph_Oster , thanks for pointing it out.