Moving geometry by selected point from the same geometry

Hi,
I am experimenting (and learning at the same time) with day to day problems that I have to do at work and trying to automate them.
How does one approach a case where I want to move a geometry to a certain position?
In my case I can to move the smaller rectangle, so that the center of the top curve aligns with the center of the larger curve. I already spend some time going trough tutorials for data structures, but moving objects around GH appears still quite difficult.

Hi Peter - I’d make a vector from center 1 to center 2 and move either rectangle on that vector (Vector2Pt component) You might also look at PolygonCenter to get the centers.

-Pascal