Shrinkwrapping complex geometry

Hey there!

how do you approach shrinkwrapping of complex geometry? We have an initial building massing model, which needs to be meshed for a CFD analysis. There are hundreds of individual objects: Breps, meshes, block instances etc. Ideally, we’d take a bounding box and shrinkwrap remesh it.

I’ve tried the TriRemesh method described in this post:

but it doesn’t seem to handle the gaps between towers very well:

A similar question was asked here: Extracting only the outer & visible surfaces of a complex model but the discussion ultimately didn’t provide any working solutions for the problem.

Maybe 2 years later we can solve it!

If your model have gaps, then you have a problem, not only with the shrinkwrapping.

You need the outside volume or also to keep small details like columns?

If the first, why don’t you use the green/pink surfaces and extrude them downward?
It seems you can get a closed polysurface of the volume of those buildings in a couple of minutes of manual work in rhino…

If this problem occours often, then it make sense to find an automatism, but if you need to do this few times, I would do it manually without wasting time on grasshopper.

It would be interesting to see the actual .3dm model, to understand better the situation.

The Shrinkwrapped feature will available soon in R8 WIP, I think they are finalizing Mac and UI. This is a much anticipated feature and we are all looking forward to it.


I face this challenge quite often. Currently, I’m doing this manually and it is a pain to go through each time a new drawing arrives. I don’t really have control over the upstream workflow and have to deal with suboptimal models with gaps, various types of geometry etc.

The CFD package uses its own meshing step, but it’s a bit fragile and easily gets tripped with less-than-perfect geometry.

I can’t share this particular file for NDA reasons, but can cook up a simpler version of it and post here on Monday for testing.

@Japhy sounds like awesome news! Any ETA on this feature?

There has been steady work on it and its getting really close. The demos i’ve seen are really doing a great job on just this scenario (open meshes with intersecting meshes). The command looks ready but there are a number of graphical details and such that need to be working before its released for testing. Any date range I give would only be a guess, they don’t put out hard release dates.

Depending on the Tolerances of your CFD analysis it seems like creating recreating the objects as simple geometry would go pretty quick. BoundingBox of similar features and shift the corners to match the shape.

A lazy and slow solution would be to use some signed-distance iso meshing. (like millipede)
You use a small distance that can close the gaps and at the end offset back the result by the same distance.
Slow, but the machine can work alone.

I don’t know if it is useful but PointCloud processing could allow to have some approximation of the shape.

Last example with building

1 Like

Dendro/OpenVdB is good at that.

1 Like

CGAL has already that for quite some time that is fast and robust.


Does the Cockroach plugin already support that?

Understood. Looking forward to getting my hands on it!

It seems that millipede was removed from food4rhino and isn’t available any more.

I contemplated this approach as well. Convert all geometry to mesh → put all vertices to a point cloud → mesh the point cloud. I’ll run some tests and report back.

Voxelize all geometry and union it into one mesh? Worth giving a shot. Again, will test this approach.

This looks very promising! New in CGAL: 3D Alpha Wrapping
I write c# Rhino code, but am not familiar with c++. Found this dotnet wrapper for CGAL but it doesn’t include this functionality yet. GitHub - Scrawk/CGALDotNet: C# wrapper for CGAL
@Petras_Vestartas do you have experience in PInvoking into CGAL and how big of a hassle it is?

1 Like

Nope, we wrap methods depending on a research project we have. It is simple process once you know how to do, but takes some time and experience.

To simplify c++ library linking I made a CmakeLists.txt with a superbuild pattern that helps to download and link all the 3rd party libraries of cockroach (Boost, CGAL, Eigen, Open3d, Cilantro) with only 2 bash commands.

You still would need to some work during the wrapping step, but the previous one is the most complicated, specially if you want to collaborate via github and open-source code.

The CmakeLists is under cockroach release folder. Commands are described in read me of the main repo:

I tested Dendro for this problem. I was pleased to see that it’s fast and versatile.

Here’s an example screenshot of a bunch of Breps from which the shrinkwrapped Mesh is to be obtained.

And here’s the resulting mesh from Dendro and run through TriRemesh for the dual mesh representation.

Here’s the interesting part of the script:


Just an addition, it is better to flatten the Mesh Input in Mesh to Volume in order to have a single calculation. And for sure Dendro is surely the best at the moment tool to do this type of work.

Do you mean join the mesh? The list is already on one single branch.

It was more a general remark I saw that you have a good result. But for others users I just suggest to not forget to flatten the inputs, because with many geometries if data is on a datatree it will lead to long calculation time and bad result (many meshes).

1 Like

I attach a simplified version of the model. It represents the usual mess we deal with - various geometry types spread across multiple layers.
Forum.7z (18.6 MB)

@laurent_delrieu suggested creating a point cloud and using the Cockroach plugin by @Petras_Vestartas to mesh it into one piece. My initial test doesn’t look very promising. Here are the steps I took:

  1. Convert all geometry to Mesh
  2. Extract all vertices
  3. Convert vertices to PointCloud
  4. Use the Cockroach_MeshPoisson command to generate the mesh

Here is the point cloud (saved in the drawing on the PointCloud layer for your convenience):

And the resulting mesh with the following Cockroach settings: Downsample: 100000, PoisonLinear=True, rest on defaults.

Another suggestion was to use Dendro by @ryein. Here is what I did:

  1. Convert all geometry to Mesh
  2. Voxelize individual meshes into Volumes
  3. Union all Volumes into one

While voxelizing worked very well, the union step omitted all thin surfaces (glass). Come to think about it - it makes sense that thin vertical surfaces don’t fit well into the voxel workflow.

Results after the voxelization step:

And after Volume Union

VolumeSettings used:

Voxel Size of 0.5m works relatively fast (<30 seconds), I tried going down to 0.1m but gave up after 15 minutes of waiting for it to complete.


Here a test using Dendro
First transform all geometry to mesh
then choose a size of step
I joined all meshes in one mesh. It is not a boolean just a union of closed and opened meshes.
I used one of my tool to populate this unique mesh with points.
Then Points to Volume (I choose a radius of 5 x the step size)
Then negative offset
Then healing the mesh
It is about 1 min with a step size of 1. (12.6 KB)

You could also separate closed mesh and not closed mesh.


First time using dendro for me…
I used ExtractRenderMesh command with the taller group alone (maybe splitting the whole work in 4-5 big chunks make everything faster?..)
Joined all the meshes in rhino, to have a single mesh to load in grasshopper.

It’s a single closed and massive mesh with 4x10^6 points!

Ok… dendro is cool!


It didn’t worked for me with the whole model,
with a little step (0.2) I got this, in green the biggest volume.

With a bigger step, a bit better,