Fitting a 3D model onto another 3D model or surface

Hello! I’m new to Rhino, so I would appreciate any help.
I want to modify a 3D model (change it’s shape, size, etc…) mainly so that it fits on a given 3D scan surface. To make things simple, I have a 3D rectangle that I want to manipulate automatically so that it sits exactly on another 3D mesh or 3D surface.
Is there a function to do that in Rhino or in the Rhino SDKs ?

EDIT:

The idea would be to reshape the 3d rectangle so that it’s outer edges match the surface

Thank you

Hello - please post a simple example as a Rhino file.

-Pascal

I’ve added a visual example, not in Rhino, but the intention should be more clear now

Hello - I am not sure I follow at all - but I think I would OffsetSrf the wiggly surface to the depth of the box with Solid=Yes, I am not sure if the intended deformation of the box is any different than that.

-Pascal

Hello,

I have a 3d object that I would like to customize using an envelope surface shape.

The idea would be to modify for example the outer shape of the 3D rectangle to follow the shape of the curved surface. The 3D rectangle will become a funky looking mesh that has the same shape as that envelope surface.
Eventually and depending on the shape of that envelope, more surfaces or faces should be created to allow for this flexibility, but is there a function in Rhino that does that automatically in the first place?

Thanks

Try Sweep1, it takes a profile (the vertical cut of your wall) and a path.

Sweep1

sweep1

Hello- `FlowAlongSrf’ is the most likely candidate I would say, but having an example file would make it easier to give a useful answer.

-Pascal