How to scale 1D in GH?

Hi everyone! I am trying to scale 1D these breps like in this screenshot:

However when I try scale NU I can only scale it from the middle and not from one of the sides of the square brep.

Any ideas on how to make it work? Thak you!

scale1d.gh (103.9 KB)

If you don’t want the center feed P a corner (x-y/2 = middle - diagonal/2 = left lower corner)


scale1d.gh (97.9 KB)

1 Like

I can only scale it from the middle

Because you are scaling from the center point (area), use a different point to scale from.

1 Like

Thank you all!!! Very much

I Just checked the definition you kindly sent me, however, all pair of squares are scaled in the same direction, and they should be like in this picture:

Screenshot%20(173)

How can I change the direction in which it scales?

@Michael_Pryor @laurent_delrieu

use a different point to scale from.

And how do I change that in the formula? @laurent_delrieu

Hello
it is far from clear what you want.

Moving a point is quite basic. What do you not understand in that ?
x-y/2 = middle - diagonal/2 = left lower corner
Box properties output a middle point and a diagonal. With simple geometry you can calculate whatever corner you need. Have you learned geometry ? Vector and Point ? You must begin by that
http://geomalgorithms.com/points_and_vectors.html