Projecting control points or edit points to a surface

Hi, I wanted to deform the control points of a surface to match another surface deformation . Both surfaces are not planar so I cannot use I think the projectCPlane command. So, I was wondering if it´s possible to project the control points or edit, onto another surface, in axis direction or wahtever direction is needed. It seems it should be easy to be done but I cannot manage to do it. Thank you everyone!

Note that projecting the control points of one surface onto another will not necessarily result in the two surfaces being coincident - as the control points of a given surface generally do not lie directly on the surface (exception - planar surfaces)…

That being said, below is a Python script called ProjectGrips which will do what you want. It has been adapted from a vb script by Pascal Golay, I think.

–Mitch

Edit - fixed bug
ProjectGrips.py (2.3 KB)

1 Like

I tried some of the originals scripts from Pascal Golay before, and this one just now, and the related ones to surface projection return errors. I dont know if it´s my instance or due to new rhinoceros 5. The uploaded image is the error I got from the python script you uploaded. Thank you

Looks like it might be a bug in the script, probably a case I hadn’t considered. Can you upload a small example here that causes it to fail? I can probably fix it so it at least doesn’t error out catastrophically even if it’s unable to do what you want…

Thanks, --Mitch

Here you go. Its a simple example but more or less the case i´m working on. The flat surface should be deformed acorrdingly to the topographic one.

example.3dm (1.1 MB)

Thanks, it was just a dumb typo… Please try re-downloading from the original post, I fixed it. (discard the original).

Oh, and as I said in my original post, although the script works, it may not give you the result you are expecting… And for this type of thing, Drape usually works OK, with a bit of tweaking - turn off auto point spacing and set U(x) and V(y) point counts according to taste…

–Mitch

Thank you very much! it worked perfect adn I think its just what i needed!!! this opens a lot of possibilities in the workflow