Scale closed curve to desired area

Hi, Just wondering if anyone knows how to scale a closed curve to a desired area.

I’m trying to get irregular curved shapes to scale to an area that I input.

Lets say the closed curve I have is at 5m2 and I want it to scale to 162m2.

Hi Kelvin!

scaleFactor = sqrt(DesiredArea/CurrentArea)

SCALE TO AREA.gh (6.3 KB)

Thanks Dharman!