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 ?
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
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.
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.
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.
Daniel… this is a really powerful tool for certain people
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
Thanks a million. I dont think many softwares have this option to refit meshes to new objects… super cool.
Great.
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.
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.
Ok… so im trying Daniels new Mesh Snap system and… I love it
Im on a train this evening for 6 hours… so 6 hours of testing 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 !
I started from a box, extruding and deleting faces, then quadremeshing and pulling onto the reference hand with a similar definition as the other part.
I like the way @martynjhogg describes though and it might actually be easier.
Wouldn’t it be an idea to add a boolean output to the Solver which triggers “True” on “Converged”? That way one could automate complex nested workflows in efficient ways.
I was trying out your code this evening.
One little thing I noticed… when you create the first cage… copy that and move it onto the new body… then change the cage a little to fit around the new body… well depending on what you do with the new cage… (changes) you get very off results… crushed up results or just simple weirdness… ( screen shot )
Just so I totally understand…
(1) Make a copy of your original object mesh-
(2) Split the new mesh so it covers where your object will be placed.
(3) Select your original object and also the new cut mesh ( cage ) into the top of the grasshopper system
(4) Copy that cage mesh and move it over the new body ( body 2 )
(5) Edit the new cage to best fit the new body ( body 2)
(6) Add the new cage and new body 2 into the grasshopper script.
Two questions. How best to edit the cage ? so I get a clean transfer ?
Second question. Should I re-quadremesh the original cage and also the second cage, so they both have the same quad count ?
I think you need to create the cage-mesh (and quad it) just one time
once you have a good cage-mesh, you will use it as:
→ cage n°1 as base-point for the transformation of the HQ mesh
→ a copy af the same cage-mesh (baked in Rhino → reoriented in space in such a way it kind-of covers the new hand → re-referenced back to GH) that goes through the Kangaroo definition and becomes the cage n°2 (final deformation)
so it’s the very same mesh with very same number of point, faces and adges, that gets just stretched around a new hand-model
I have also found useful to add a grab component in Kangaroo and play stretching a little bit the mesh here and there just to avoid those little waves that sometime happen