Hello,

I’m new to grasshopper and would appreciate your help. I’m trying to scale a geometry to a target volume, while maintaining the same height. It should scale equally in the x and y dimensions, while maintaining same z dimension. The idea is to make it work for different shapes that are not defined by a single volume equation (like a box where volume is length x width x height).

I know the geometry can be scaled uniformly like this:

But my attempts at non-uniform scaling have not been successful, and I am only guessing the scaling factors at this point. How can the scaling factors be determined for x and y so that z=1 and the target volume is reached?

Please see attached .gh file, it looks like this:

on the right(scale in xyz), the geometry is scaled in all directions as in the picture above.

On the bottom (scale non-uniform), I tried using non-uniform scaling components from pufferfish and grasshopper. I’m stuck here and I’m not sure how to proceed. Any help is appreciated.

Here is the bottom part of the script up close:

Scaling_to_volume.gh (34.4 KB)