How to get the distance between the centroids of two rectangles?

The Geometry.DistanceTo node can get the shortest distance between two rectangles. How to get the distance between the centroids of two rectangles? Is there any node that can be achieved?

1 Like

Pull the centroid from each rectangle (variety of ways to do this), and use the Geometry.DistanceTo node to get the distance between the two points. :slight_smile:

1 Like

Thank you! I can use the node Polygon.Center to get get the centroid of the polygon. But is there any node that can get the centroid of the rectangular surface?

@565384351 …try these amazing nodes here from Genius Loci…probably it could help you :wink:

2 Likes

Thank you very much!