"Inverse" ShrinkWrap

ShrinkWrap builds a volume covering the outer surfaces. I’m looking for a way to build an inner volume. So, instead of building a volume covering the outer surface starting from “infinity” and shrinking, it should build a volume covering the inner surface starting from a given interior point and then growing up. How can I do this?

1 Like

Please post your model / object and a sketch of what you expect to see.

1 Like

I imagine it’s like blowing up a giant balloon inside a room - except the balloon knows not to expand out of the doors or windows.

1 Like

inflate_collision_01.gh (22.9 KB)


Thank you for your fasr answer.
H37.3dm (120.4 KB)

Here are the model and 2 pictures illustrating what I mean. The point -4.00,5.00,8.00 is an internal point.
The blue solid is the desired result. How can I generate this solid?

1 Like

Is this gh-file a script that I can use to solve my issue?

1 Like

Yes, the procedure is like a baloon blowing up. For the moment, we must assume that there aren’t any holes (open doors or open windows). Maybe one should define an outer box as well, which limits the “balloon” to grow undefinitely.

1 Like

The inflation can be simulated with Kangaroo. The way you set up your walls is problematic since the four vertical walls create a void. I didn0t worry about that and replaced the three voids with two cylinders and a box. I’ve used NURBS for this since I find it’s easier to manipulate in this case. I rounded the edges between the horizontal cylinder and the other two parts since the sharp edge can be a problem for the Solid Collision. The initial ‘balloon’ is a mesh pipe created with Multipipe and subdivided with TriRemesh.

I’m using Rhino 8 and parts of my definition probably won’t work for you in Rhino 6.

inflate_collision_01.gh (389.0 KB)


Thank you. I’m planning to upgrade to Rhino 8, so, it will be ok.
_What do you mean with “the four vertical walls create a void”? As far as I know, the space is completely watertight.
_Does the gh-script need an initial point where to start to grow? It should have, because I need to specify which space I am interested in.
_If I start from NURBS-surfaces (or better, from meshes) and an initial point, is there a way to create a solid without any manipolation of the geometry?

Yes it is but for the Solid Collision you need the other object which you showed on one of your screenshots above… You can create a union of the vertical cylinder, horizontal cylinder and the four vertical walls. The object above your tunnel does not overlap nicely. I got an invalid mesh after subtracting the two large objects from the mesh union.

Where does the inflation start… You can use a point but this will lead to more stretching and it will likely create a bad mesh. As I wrote above, I used a cylinder / mesh pipe as starting volume instead.

Yes, if the four vertical walls are one box, you could just boolean union the two cylinders and the box. Then if needed subtract the meshes form the boolean union. It doesn’t matter if you start with mesh shapes or NURBS.

when you said inverse it means you could also invert your mesh so inside will be outside.
A mesh could be inverted from a point with a formula like that

DistanceInverted = 150 -distance

and then come back with

Distance = 150 -DistanceInverted

Depending on the point I choose on a line inside the volume

Convex hull on an end

reverse geometry.gh (49.5 KB)

Defects are due to triangles that are too big when inverted. If the remesh is done with said 0.25 it is better.


Here’s another take on the invert-wrap-invert idea

invertwrap.gh (41.4 KB)

However, I think maybe these enclosed interior volumes are actually already being created during the Shrinkwrap process, but culled from the output and it might be possible to add an option to keep them @Trav ?


ShrinkWrap as we know the command can’t do this, but we could use similar approaches with some new command that focused on solving this problem at a future time.


I would cut the mesh into two parts with SplitMeshWithCurve command. Then I would run the ShrinkWrap command on both parts. Finally I would remove the outer surfaces and join the inner surfaces.

1 Like

i would assume so either, the only thing which would be different is that the surface from inside would be slightly smaller, having the transitions from each surface to the other further inside. so basically if i am not mistaken one could simply offset the given geometry slightly and then shrinkwrap it.

1 Like

This output (the blue solid) seems to be exactly what I am looking for.
Does the gh-script need the specification of an interior point?
It should be, because there are many possible different outputs, as the initial solids (red solids) enclose many different volumes.

Yes, that point input to the circle is the centre of the inversion, so the volume is the one that point is inside.

:sweat_smile: speechless lol

I need to learn GH and Kangaroo more :star_struck:

If I’m not mistaken, this almost looks like a tighter more accurate ‘reverse engineering’ secret sauce than ‘shrink wrap’ :thinking: :thought_balloon:

I would have to see how this ‘invert wrap’ works compared to the other one :sweat_smile::


The shrinkwrap part in my definition is just the grasshopper version of the Rhino command, not different code.

Inversion is a geometric transformation that turns shapes inside-out without changing angles.

As Laurent pointed out, if we swap inside and outside, we can just the existing shrinkwrap function, then swap back to get this filling volume.


I will test the gh-script in the next days and let you know.