Using Rhino's squish command in Grasshopper

I am trying to use the Rhino squish command in grasshopper. I have a python block that can run the command, but it requires baking to be part of the process. I am wondering if there is a way to use grasshopper meshes instead of ID’s selected from Rhino?

Screenshot 2024-06-27 114059

Squish (9.5 KB)

You could try forcing this ‘physically’ with kangaroo - easier when you have a simple naked edge like in your case.

Triangulate your mesh and then unfold. This helps if you’re not after 100% exactness, which I think you weren’t anyway because squish doesn’t do that.

Check attached file:
Squish (21.0 KB)

There’s also a simpler ‘fake squish’ for this case in the file, if you wish to stick with nurbs:

Make sure you press that reset button:

Oh wow! thank you that is all very helpful! I was looking to see if I could find a way to do this with python, as I am also trying to be able to un-squish curves to add onto the original surface.
Squish (13.6 KB)

1 Like

To use the Rhino squish command in Grasshopper with Python, you can employ the Squisher from RhinoCommon.

import Rhino.Geometry as rg
squisher = rg.Squisher()
parameter = rg.SquishParameters.Default
a = squisher.SquishSurface(parameter, srf) (8.4 KB)


Not sure what this was, no curves were in the file, maybe internalize them?

Equally unsure what your end goal or workflow is, not that I need to know, though :slight_smile:

Mahdiyar corrected the python - not sure it’ll work with your halved sphere automatically, though.

I tweaked* the previous file:
Squish (37.9 KB)

*made trimesh border vertices use ‘co-circular’ goal, played with MeshMap and some surface morphing options to ‘unsquish’ some test curves - unsure that’s what you’re doing, though:


1 Like

Thank you! This was exactly what I was trying to do. I ended up figuring out how to use this to un-squish curves as well. (16.1 KB)