Refit Mesh Object to new shape

Hello everyone.

I have a simple question but cant really find a simple solution… not yet.

I have a shape… then I created an offset piece from the first shape… Now I want to change my in-put and adopt my offset mesh to the new object.

So i was thinking… I use my offset piece and convert it to a SUBd part in Rhino 7.
Then create a grasshopper code… that will drive all the DUBd control points towards the centre ( where my old and new object is) The code would drive each control point along 1 axis… towards the object.
and then stop, when it meets the object ( main body )

So kinda like… a shrinkwrap but shrinkraping an object with thickness and not just a mesh plane ( like in Blender )

Here is a picture and a rhino file to help people understand what I mean. Very simply refitting a mesh object to something else…

I would love to get some help on setting this up in grasshopper.
Thank you.
Ian :slight_smile:

transform.3dm (3.4 MB)

Morphing from one shape to the other is probably possible, but it sounds like the easier option here might be to create a new offset from the second shape in the same way you did it for the first?

true !
But this example is a very simple version.
I am using to demonstrate the idea as simply as possible.

I have much more complex mesh forms that need refitting to new central core objects.
But if we could wire this… refit mesh to new mesh… using new tools in rhino 7… then we all have a very powerful new tool :slight_smile:

I see.
To morph geometry from one mesh to another mesh with the same topology you can use the tool I linked in this thread:

Hi Daniel.

Do you mean this ? ( mesh cage morph component )
Can you tell me where I can get the latest version for rhino 7 ?

Also is there anyway, I could tell this system to move all control points of my cage… towards a target mesh object… so auto-fit ?

Thank you.
Ian :slight_smile:

This MeshCageMorph component is included in the Fattener.gha plugin posted here

I think a sort of radial auto-fit like you describe would be possible, I’ll make an example.

1 Like

Here’s a definition that cylindrically projects a cage and uses that to morph the geometry (69.8 KB)

Good morning Daniel. Thank you for the first test version. I tried out my simple test objects and the outer mesh did try its best to move in and fit the inner cage… but the fit… only met the outer most point and stopped. the mesh didnt… so melt onto the new surface… if you know what I mean.

Maybe this would work better ? if the meshes were turned into SubD objects in Rhino 7 ? what do you think ?

Thank you.
Ian :slight_smile: (17.6 KB) refit mesh.23.03.2021.3dm (2.4 MB)

or mabye… ??

I need to make sure the new body has the same amount of mesh points as the old body… then use your ( Mesh Cage Morph ) tool… ??

Sorry i know im an idiot… but i just know that refitting mesh to new objects is a game changer tool in my work…instead of rebuilding almost the same thins again and again… just because the starting BODY changes…

Thanks for all your help.
Ian :slight_smile:

ps. I looked at the cluster and spotted the Boundary Box function was pulling the mesh towards the internal object based on one outline from one height point… meaning it pulls the geometry towards the face but does not keep going to cover the other deeper surfaces…

Yes - if you can do this it makes the morphing more straightforward.
I shared this example with the cylinder because your file had different vertex counts and topology between the reference and target geometry, and you described moving towards the centre along 1 axis, so I thought this was what you were after.

It can sometimes be good to have an abstracted or simplified example, but here I think it would be easier for us to understand if we see something closer to the real project you want to apply this to and where the different geometries are coming from.

your correct.

Here is an example of what I do. Why I need this.
Because every hand is a little different but building a new construction every time… with the same wall thickness and same conponents like the holes and belt holders… is a real pain…

So my hope is… using your system… new hand comes in… exisiting design is fitted around new hand… checked and done.

Here is an image of what I mean.

I think in this case it would work best to make a cage with fairly simple topology on a reference hand, and pull the vertices of this cage onto the different target hands.
Then you could model the detailed structure around the reference hand, and morph from that to the target cages.
I’ll try and make an example.

Here’s an example showing wrapping a mesh onto a new target and morphing to that (619.2 KB)


Daniel… this is a really powerful tool for certain people :slight_smile:

I have purchased the upgrade to rhino 7 and should get the serial codes… tomorrow hopefully… then I can create the quadmesh… and object cages… and really give your script a good irish test :)… no alcahol involved :wink:

Thanks a million. I dont think many softwares have this option to refit meshes to new objects… super cool.

Ian :slight_smile:

1 Like

I think the workflow I show above still needs a lot of improvement, and hopefully some of the steps can in future be made simpler - like the way of creating and wrapping the red/blue meshes. Let me know if you have any trouble applying it to your shapes.

1 Like

Hi Daniel.

I just installed Rhino 7 and got 2 error messages with your last script ?
Any idea why that is happening ?

  1. Vertex geometry failed to load. Mesh topology may be corrupt.
  2. Face vertex exceeds mesh vertex count.

Here are the messages:


The component with the Play icon is a Data Dam component.
This delays the downstream components from calculating until you click it.

It is needed here because the final morphing can take a second or two, but the wrapping happens iteratively, and we don’t want to have to wait for the morphing each time it updates.
When wrapping onto different hands the ‘LengthFactor’ input might sometimes need adjusting so that it fits well, and it can be helpful to see live updates during this.
So in this definition you need to let the wrapping part run, checking that the mesh labelled ‘cage wrapped onto target hand’ fits well, and adjusting LengthFactor if needed. Once it has finished solving the Kangaroo component will say ‘converged’, then you can click the Play icon of the data dam to pass it to the morphing part.
This is what I’m referring to when I say I’d like to make it simpler - I think there might be a way to automate some more of these steps.

This is really interesting and would have a huge number of uses for things like prosthetic design and custom fit anything basically.


yup… then we could invest our time is desiging the best 3d products for disabled people… and not just in the repeative 3d production…

big win… amazing design… snap… onto the new leg or arm or hand… check and … :slight_smile:


Ok… so im trying Daniels new Mesh Snap system and… I love it :slight_smile:
Im on a train this evening for 6 hours… so 6 hours of testing :slight_smile: cant wait.

One little thing, can Daniel please explain to the idiot irish boy… how I create the cage mesh like you did in the above example ? I think I understand the rest…

With some tweaking and using the new beautiful quad resmeshes… this would be a big big tool for rhino 7 !

wrappingmeshes (614.3 KB)