Scripting the adaptation of a curved surface to best-fit an irregular 3D mesh

Hi,

I would like to script the following in Rhino:

I would like to import an irregular 3D mesh (obtained from a scan) then script the adaptation of an existing curved surface to best-fit this mesh. So for example: a prosthetic cast that has been designed in Rhino, to then fit around a 3D mesh obtained from the scan of an arm.

What would be the best procedures to use to do this in Rhino?

Many thanks,

Andy

I would use the Patch command using the mesh as the input and the cast as designed in Rhino as the Starting surface. Some experimenting with Patch command parameters may be needed to obtain the best results.