Scale Length according to distance to plane

Hey folks,

i’ve been trying to calculate the y-size of rectangles using remap numbers for a while now and i can’t get the desired result.

The width of the boxes should decrease with increasing distance from the XZ plane.

I appreciate any help ! Please excuse the messy graph.


Do you seriously expect anyone to give you advice based on this image alone? :man_facepalming: :man_facepalming: Really?

Try posting your GH file with internalized geometry (or R6-compatible .3dm file).

3. Attach minimal versions of all the relevant files

Hey Joseph,

sorry, you are right.
I now attached the .gh script.

Script_Boxes.gh (26.5 KB)

I believe you get what you asked for by simply flattening the input to Bounds?

However, instead of Scale NU, Orient and extrude in ‘X’ direction, I wonder if what you really want is to create the rectangles with a remapped ‘X’ dimension and extrude in surface normal direction?


Script_Boxes_2021_Jun25a.gh (31.2 KB)

Thank you! Flattening the input to Bounds was exactly what I was missing!

The extrusion in X direction is right for my purposes.

The last thing I am struggling with is, I would like to align the vertical “rectangles-rows” parallel to the z axis, but since they are aligned by the uv curves, I have a hard time adjusting them. Do you have any tips for this?

Thank you very much in advance!

Cyan group? Looks messed up to me.


Script_Boxes_2021_Jun26a2.gh (32.0 KB)

What I was trying to say was the general orientation of the boxes on the surface (as in the attached picture).

DOH! :man_facepalming:


Script_Boxes_2021_Jun27a.gh (38.6 KB)

1 Like

BANG! Thats exactly what I meant. Thank you.

I just cant get my head around the “shift paths” function so far…

Connect text panels before and after PShift to see what it (or any component!) is doing:

1 Like

Yes already took a look at the data. But my problem was more the logic behind it.