Shrinkwrap challenge

@clement thanks, so far I don’t see your crash report in our logs. Can you email me the video and the geometry? travis@

1 Like

Hi @Trav, i’ve feared about that crash report coming not through so i saved it before it gets automatically deleted from the desktop. Will send you a PM in a few minutes with a download link.

btw. the geometry is the file in the first post.



I got intrigued by the challenge and took CGAL’s AlphaWrap for a spin. Using @Trav’s prepped geometry I joined everything into one mesh and ran it with the following settings:

The nice thing about their algorithm is that it literally wraps underlying geometry with a triangulated mesh (rather than using voxels as in Rhino WPI) which can result in better preservation of sharp edges and smaller details.

Here is a close-up with alpha set to 0.05:


Very interesting. I’m surprised their manual says nothing about ‘align’-ment of meshes… or pointclouds…

I’d very much like to have a solution for aligning them too.

That mesh looks very nice though, is it a Rhino plugin?

It’s a GH plugin I compiled using their library. Hasn’t been shared anywhere but if people are interested I could publish it in the Package Manager.


The manual seems very complex.

I feel like their should be mesh/pointcloud ‘alignment’ features :smiley: :sweat_smile: :crossed_fingers:t4:

I see stuff on ‘orient’-ations … but not intuitive for me to understand at a glance…

This is pretty much all you need to understand how to use it:


K, but what if that bicycle was comprised of over a hundred separate pointcoulds/meshs that weren’t aligned very well?

Are there solutions for improving the alignment, before merging the data?

i.e. “…tries to consistently orient a soup of polygons in 3D space.” :face_with_monocle: :thinking: :thought_balloon:

Here is a more detailed comparison between Rhino’s ShrinkWrap and CGAL’s AlphaWrap.
Rhino is generally faster, but due to its voxel-based approach tends to loose sharp edges. AlphaWrap, while slower, preserves more detail. Especially coupled with TriRemesh as a post-processing step.

Thanks to @Alexander_Kaplan for providing the sample mesh and stress-testing the plugin.

Rhino default:

With TriRemesh (Length = 0.2, Sharp = true, Iters = 20)

CGAL default:

With TriRemesh (Length = 0.2, Sharp = true, Iters = 20)

Input mesh on the left, wrapped result on the right:


Those are beautiful results.

I’m still needing a mesh alignment solution, or “registering” solution, so I can align old scan session files to recover them.

I’m faced with choosing to spend time with ‘mesh lab’ software … probably. There’s really no other option I can see yet.

Hi @mrhe, can I please take you up on this offer if it still stands? I’m struggling with ShrinkWrap effectiveness on thin geometry (trailing edges etc.) when preparing for CFD studies. Thank you

Sure thing!
It’s available in the Package Manager as Cocoon BubbleWrap:


High alpha:

Low alpha:

All credit goes to the CGAL team. My contribution is only in porting their functionality to GH. Do let me know if you have any ideas on how to improve it.


Nice, thanks for sharing!

There is an older Grasshopper plugin from Dave Stasiuk also called Cocoon, which could potentially cause some confusion.

1 Like

Thanks for the heads-up. I couldn’t find it on Food4Rhino, nor in the Package Manager and went with the name but am definitely not attached to it.

Is there a list of all GH plugins I could refer to, to avoid further confusion? I though F4R would be the single source of truth…

1 Like

Yes, unfortunately there are still quite a few older plugins not on F4R or PackageManager.
This page has a pretty good list

though I think even that is not exhaustive.


Changed the name to BubbleWrap to avoid confusion:


is it possible to get feedback from the plugin to find out the processing time ?

1 Like

Thanks! This is uber useful for me. Just wondering though as CGAL seems to be very big, under what algorithm/title is this found under?

@SalvadorIII, check out AlphaWrap.

@taraskydon, you can always turn on the GH profiler to measure the execution time. Or do you mean estimating the processing time before running the command? I wouldn’t know how to do it.

1 Like

Display > Canvas Widgets > Profiler

1 Like