How to move a polygon to a center point of another curve?


I’m trying to create a rectangle as a base and a triangle which is in the centre of the rectangle.
Then move the triangle on the Z direction and eventually loft them.
My question is when I place the rectangle component it gives me a grid but when I put number sliders it stars to expand from the original grid. It’s the same for the polygon. When I place a triangle by default its on the centre but I want it to be in the centre of the rectangle.
It might be complicated but my end result should be a rectangle in bottom and triangle on the top and loft them through a path(corner of the rectangle to corner of the rectangle)
Attached are some screenshot of what I’m doing. I really appreciate your response.


If you get the area of the rectangle and use that as the center point of your polygon. After you can move the triangle to the Z location you want.


Thanks very much for your help.

Sure thing.
I did realize you asked about lofting as well. One way to do it is by using the merge component. Takie the geometry out from the rectangle and move component into the merge component. Then out from the merge and into the loft component. There is also a loft options component.
You may have to reorder things in order to get everything lined up appropriately. That’s were data & list management comes in. Something I’m not great at explaining or doing.

1 Like

Just a quick note that Polygon Centroid component work better than Area as it uses less resource.


An alternative way to Ryan’s method if you wanna keep the rectangle centroid fixed to a certain point:

The rectangle component is asking for imputs of X and Y dimensions as 2 domains,
so assigned your desired point to P,
and XY dimensions by creating 2 domains.

e.g. a rectangle centred at point 0,0 (width 5, height 7) will have X as -0.25 tp 2.5, Y as -3.5 to 3.5 as 2 domains.

1 Like

Thanks for the alternative route. I tried to assign a point instead of a plane. However, I don’t get your example. Once I assign a point and connect it to the P in a rectangle, I have two domain which is X and Y and then I control the values with number slider.

Does anyone know how I can smooth the generated loft shape.
I tried to play with loft options by right click on loft component but had no luck!

Looks like It’s not the fault of GH loft, but your low render mesh resolution.
Try to change your render mesh quality from “Jagged and faster” to “Smooth and slower” or custom quality.(In Rhino option)

1 Like

See the attached. (15.4 KB)

1 Like

Awesome, Thanks HS_Kim and Zach X.G. Zheng