Shrink Wrap with Kangaroo

Your Rhino file is missing a boundary for the mesh. I think in the real world you would tie a mesh to a rigid boundary. Most probably the simulation can be achieved without collision detetction, if the boundary is on the edges of the building.

Here’s how I would do it if a triangulated mesh is sufficient for this project:

  1. Define the boundary curve on the building. Set the curve seam to a corner of this curve and set four corners for this curve in the Grasshopper definition. The order of the points needs to match with the curve direction.
  2. Project the curve onto a plane outside of the building. This projected, planar curve has the same topology as the original curve. The plane for the projection needs to be chosen so the projected curve does not have any self intersections and does not loose any segments.
  3. Start with a less defined mesh until you know the definition works fine. Then lower the Length value on the triangulation.

Topological setup:

PS: the right side of my example does not have any curvature in it. I think I’d try to have a boundary that creates more 3D than what is currently shown.

111.gh (39.6 KB)

111.3dm (17.8 MB)

Hey Martin
Thanks so much for your help on this. Unfortunately my grasshopper skills are very minimal and so figuring out how to set this up is really difficult. Below I have attached just a single object that is my building and I was wondering if you could explain how to use the codes above for using a sinlge Brep to define this shrinkwrap

This one.3dm (777.5 KB)

Your building polysurface doesn’t join, has internal surfaces and needed to be fixed before it could be used as a valid solid for the collision.

Again, please add a sketch of what you are looking for.

That makes sense. I have attached a new fixed model and photos of what I am going for below. One photo is a 3d print i made and wrapped in a stocking which is the look of what I am going for. As well as the photos I added. The faces of the extruded boxes will be glazing, but i just am looking for the edges of the extrusions to be sharp.
Blueprint-by-SO-IL_dezeen_468_9
FIXED EDGES.3dm (395.9 KB)
images


please tell me if you need anything else. I really appreciate it your saving my butt!

There are a few challenges…

The first one is remeshing your object with TriRemesh so it has colinear edges like your polysurface. This failed at the real size of your building and I needed to scale it down to get it to work.

The vertices on the outermost convex edges can be set as anchors. In theory a net would also slide over those edges… The top and bottom side of the mesh can be ignored to save some time.

We’d be done, if it wasn’t for the collisions. In order to have a somewhat useful result, the mesh and the collider need to be relatively dense meshes, otherwise the edges aren’t crisp. It would be easier if the collider was a sphere. The denser the mesh, the more precise is the result but also the longer it takes.

I get the best result by moving the collider solid incrementally towards its final position. In this case I scaled it from 0.96 to 1 in 0.002 incremets with a slider. I changed the slider value with a keyboard shortcut. After having done this twice, I realized I could use a counter that I think Daniel Piker posted a while ago. It needs to be stopped manually but it’s still a lot bettr than pressing a button repetively.

I also increased the mesh density. The star shape is still problematic.

shrinkwrap_building.gh (8.7 MB)

This is literally perfect wow! This is exactly what I was looking for. Is there anyway you could post the baked model? I dont really need to change it at all!

It’s at the end of the definition, isn’t it?

should I set the object as the brep and it will just work? or do i need to set anchors on the edges?

oh yes, it was hidden away from the main building at the constrcution plane. You have saved my project!! thank you much Martin you really were so helpful

Yes the collisions are still a pain…


Martin you are the batman for kangaroo, always waiting, always watching

Hey Martin, I made some changes to the file, I think it may work better now?
Retry.3dm (367.3 KB)

Not sure, your object orientation differs from the last file.

I placed it with what I assume is the underside on the XY plane, scaled it down and I’m also using a millimeters template with 0.001 units tolerance in contrast to your 0.01. I also added a hexagonal shape on top of your asterisk shaped logo.

Updated file with result internalised:

shrinkwrap_building.gh (7.2 MB)

Hi,
I am trying to build an approximation of a shoe last from a foot scan (see picture and file attached). The front part of the foot would need a bigger curvature wrap (to smooth all the fingers gaps and provide comfort room) when I need the wrap to stick closer to the scan with a shorter curvature for the rear of the foot.
I have been trying using the Shrinkwrap function in Rhino playing with offset and smoothing iteration but couldn’t get an accurate result.
Would that be possible to have a definition where we could control the maximum curvature of the resulting shrinkwrapped mesh. Also it would be great to have a gradient tension of the shrinkwrap based on attractor.
FootScan.3dm (522.0 KB)

Here’s a go at something to wrap/relax with a gradient:
toe_relax.gh (388.7 KB)
toe_00000

Genius! Thanks a lot Daniel.
-The graph mapper is very sensitive and I can control the relaxation only from 0 to 0.1 on the Y axis. What should I change so I get a wider space to control the relaxation?
-Is it possible to fix all the vertices at the bottom of the foot so the mesh only “inflate” on top?


Are you remapping the Y values from their bounds to 0..1 like I showed with the X values?

To prevent vertices moving below the ground plane, you can add a ‘Floor’ Goal. This always sets the floor as Z=0, and I see your model is placed with its base around -34, so you’ll also have to move up the input mesh.

Well noted. I will work on it.
Thanks again. Your help is really precious.