Shrink Wrap with Kangaroo

Hello,samplewrap.3dm (6.5 MB)

1.gh (41.5 KB)
2.gh (37.5 KB)

I am new to Grasshopper and I am struggling with shrink wrapping object. If someone can help me with this issue, it would be great! Since I do not know how to write my own definition, I found two definitions that gives me the result that looks close but they all still have some problems. In the image I attached, the one on the very left is closest to what I want although I need the edges to be sharper. And that is what was included in the Rhino file that I downloaded from Forum with the definition. However, when I use the same definition ([1.gh) and bake it, the middle one in the image is what I am getting which is way too tensile. And I also found another definition (2.gh) and I could get the result on the very right. This one on the other hand is not tensile at all but I could get sharp edges. Since I am completely new to Grasshopper, I could not figure out the problems. If someone knows how to solve it, please let me know! @laurent_delrieu

Thank you very much


shrinkwrap_sharp.gh (24.2 KB)

Here’s a go at this with the current Kangaroo, also using MeshEdit to make the convex hull to start with and Weaverbird.
It’s still not perfect - edges that are part of the input geometry and the convex hull stay crisp, but it can still end up rounding other edges inside as it shrinks.
I’d like to improve this, but I think it will need some slightly different way of finding the collisions, and/or remeshing while shrinking.

6 Likes

this is very cool Daniel, I noticed that the convex edged that stay crisp are also the ones that have a row of points (red) along them, and the ones that get ‘eroded’ or undefined are the ones that do not have these points. I’m not familiar with Kangaroo yet, is this a solver problem or an input problem?


1 Like

The remeshing step after taking the convex hull can keep sharp the mesh edges which are on sharp edges of the hull. Then in the relaxation these points can be kept on those edges.

However, as the mesh shrinks it can collide with new parts of the solid being wrapped, with sharp edges that weren’t part of the convex hull.
Since it is only the points of the wrapper mesh that are being checked for collisions, mesh edges can still end up passing through the solid.
Ideally we’d check for collisions of the edges or faces of the wrapper mesh with the solid, and then split or flip those triangles to make new crisp edges form as needed. It gets a bit complex, but I think could be a route towards the kind of crisp shrinkwrapping that magics can do.
There was some nice work on this kind of approach for cloth simulation in last year’s SIGGRAPH:


Some day I’ll have a go at making something more like this.

Thank you very much for the reply. But I am getting an error message next to the right most mesh command saying that data conversion failed from line to mesh. And also, do I have to set my objects in the Brep? once I do that, the grasshopper goes Not Responding. I am trying to Set Multiple Breps with complex and large size. Is that maybe why the grasshopper goes not responding? Because my final purpose was to wrap my building which would be complex and multiple objects. Please let me know what I should do. Thank you very much!

that makes sense Daniel, thanks for the explanation. Having a solution where no points/edges touch the input mesh would be ideal. Even having a nominal offset amount, so instead of the wrinkwrap touching, it can stay always away by a keep-out distance. Than can also be controlled by offsetting the input mesh I guess, but when those are complex and non-manifold, or have self intersections, the mesh offset fails.

This error is due to the output from the Solver consisting of my than just a mesh (mesh and lines). If you use the ‘explode tree’ component, and then plug the second output (consisting of only the mesh) into the mesh component, it will clear that error.

You can plug your Breps into the first component…replacing the boxed-shaped brep that’s already in there. As for your Breps…it would probably be best to use one singular, closed Brep that’s a simplified form from your building.

Thank you very much Ahnjoe94

hello, I used this definition days ago, but suddenly it is not working…?

I thought maybe it was a problem with the definition I had been working on, but I just redownloaded the one on this forum, and same problem.

I had been working on it on a different computer, but my Rhino is updated, I have all the components the definition required.

Hi,
Have you changed the starting geometry referenced from Rhino?
What is the error message on the Convex Hull component?

Yes, I changed it.

The error message was:

  1. Solution exception:Could not load file or assembly ‘Plankton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.

Actually today, I downloaded Plankton version 4.0 specifically, and now the definition works but the shrink wrap is still not as ‘slack’ or stretchy as it was. It’s pretty rigid, like it stopped at wbTriangles in the definition. Also Rhino gets a LOT slower/just freaks out and goes non-responsive for a good 3 minutes once I set a new brep for the definition.

What my wrap looked like:

Now w/ Plankton 4:

Dear dan,
I also have some problem. It appears that Simple remesh is installed !
but then when I restart the rhino it wants me to download it does not show, and I can’t find component anywhere on the web to download it manually.