This definition approximates a shrink wrap for generic brep geometry.
There are two steps:
The first step creates a mesh from a bounding box and drags each vertex to the closest point on the brep. Andrew Heumann offered a similar definition back in December (http://www.grasshopper3d.com/video/shrinkwrap-with-grasshopper?xg_source=activity)
The second step takes the original vertices of the mesh and treats them as anchor points (since they are now 'attached' to the geometry). The mesh is then triangulated and subdivided and a pressure value is placed on the new faces with Kangaroo.
Uses Kangaroo and Weaverbird. This is still in development, so please let me know about any issues with the definition.
Video: http://www.grasshopper3d.com/video/shrink-wrap-with-grasshopper-and-kangaroo
Files (old):
Update (03232014):
Here's an updated file which will work with the current version of Kangaroo. This definition also uses UTO's Mesh Tools. Use the same 3DM as above and let me know if you run into any issues.
Michael Pryor
Thanks alot man, much appreciated.
Oct 29, 2011
RWNB
Thank you very much.
Oct 29, 2011
Arif Mokhtar
Cheers mate, looking forward to having a play with this!
Oct 29, 2011
Tuan N. Tran
thanks for sharing!
Oct 29, 2011
daniel koene
can this shrink wrap be done in reverse? so it inflates into a shape but deforms when colliding with the shape. for example a sphere in a box.
Oct 31, 2011
kleerkoat
thank you for sharing!
Nov 1, 2011
Erick Katzenstein
Daniel,
If you're dealing with orthogonal surfaces, you could probably isolate the interior surfaces and then use this definition on that...and then the inflation can be done by making the pressure level positive.
As I see it, this would be difficult to set up for generic geometry. I think you would have to develop a way to make an inscribed bounding box, which would require a hollowed structure.
I think a more physically accurate shrink wrap can be developed with kangaroo, where you can put the shrink wrap on the inside or outside surfaces, but as of now, the brep collision properties aren't working as rigidly as we would need it to.
Nov 4, 2011
Jørn Lambertsen
The simple one worked really perfectly for me! But the Kangaroo version seems to have a lot of issues with the Weaverbird components, I can only get it to work (somewhat) when I bypass those... Is there some kind of conflict between WB and the newest build of Grasshopper, it keeps giving me 'invalid meshes'? (I use 0.8.0066)... (Well, I might also just be doing something wrong, it is a slightly complicated definition... for me anyway! :)
Jan 31, 2012
Erick Katzenstein
Jorn,
I had an issue with invalid meshes in the previous version of Weaverbird. Have you updated to most recent?
Feb 1, 2012
Jørn Lambertsen
I might have an old version of WB... I'll try to update and see if that works... Thanks:)
Feb 3, 2012
Jørn Lambertsen
Yes! My version of Weaverbird wasn't updated, It works fine now, thank you!
Feb 5, 2012
Maira Khan
great share.... thanks
May 5, 2012
Erick Katzenstein
Meria,
The negative pressure is the only function right now that makes the wrap tighter. Since the bounding box is connecting to the nearest point on the geometry, the wrap will not attach to concave surfaces. You could try to subdivide the mesh again and then drag the new vertices to the surface, but that may get a little complicated.
May 5, 2012
Maira Khan
Thanx Erick,
would the results be same if the brep to be wrapped is a set of geometries imported from 3dsmax or sketchup???
also....... is it just my system or the eventual wrap can not be baked?
May 5, 2012
Erick Katzenstein
The mesh is probably not baking because it's invalid (see posts below). If you update to the newest version of Weaverbird, it should work.
May 5, 2012
Wei
some parts of the grasshopper cannot see clearly. I find it hard to figure out. Can you share the grasshopper file here? Thank you !
May 11, 2012
Ryan Whitby
Trying to get this working but the data flow seems to stop at "ReRoute Cluster" Any suggestions.
Thanks in advanced.
Jun 29, 2012
Thomas Day
Hi Erick,
I'm exploring your shrink wrap definition and having some trouble getting the mesh to work when turning on kangaroo. The object individually wrap, but it's broken where you would expect the shrinking to occur. When I turn kangaroo on I can get it to connect by turning up the glue range. The problem here is that the faces are triangulated instead of smooth.
Thanks!
-
thomas
Oct 14, 2012
Kurt Fausset
Hi Erick,
This script is exactly what I've been looking for but with all of the updates, the script is outdated and cannot find the appropriate replacement components. Do you have any suggestions on repair or replace for the following outdated components?
1. ReRoute Cluster (input=BBoxMesh output=Mesh)
2. KangarooSetupCluster
Thanks ahead for any advice.
Mar 14, 2014
Angela.nk
same question as Kurt.
It would be great if you can update the definition.:)
Mar 16, 2014
Erick Katzenstein
I've finally gotten to update this. Check out the post above for a newer version.
Mar 23, 2014
Kevin Yen-Po Chen
I'm getting "null" for all the forces. Do you know any way to fix that? Thanks!
Jun 24, 2014
Alexander Torrez Chang
I remember a previous version that Daniel might have worked on with a "Glue Range" slider.
Is that simply the spring pos/neg direction?
Aug 14, 2014