This is probably just my not putting in sufficient error checking, a script shouldn’t error out even if you throw inappropriate data at it. I need to update my Mac, so I’ll look into it later… But Willem is correct, you cannot unroll a sphere, you can only unroll developable surfaces. So all the corrected script will do is simply refuse to run in this case.
Yes. You cannot unroll non-developable surfaces in Rhino (or accurately anywhere, it’s physically impossible without some stretching). What you see in your image is a tessellation of the sphere into flat panels and their subsequent unrolling.
You can do something similar by drawing a mesh sphere (without too many facets) and then running MeshToNurb on the mesh. You will get a polysurface which is the equivalent of the mesh, with one surface for each mesh face. This needs to be done because Rhino cannot unroll meshes currently.
You can then unroll the polysurface - although it will likely not be as organized as the image you posted (but it makes a fun pattern here).
–Mitch
However with a couple minutes work and a couple of hidden secrets, I was able to get it to unroll in the same way as your image…
A few questions:
-The unrolled srf is always grouped to the original, it is possible to get two separate groups?
-Is it possible to add a dot to the unrolled srf with the unroll info: “Area is 255.5194 sq millimeters (0.01 % ) bigger after unrolling”
(to check the developability)
And I get a strange error: Sucessfully unrolled 0 objects | Unable to unroll 4 objects (it actually did unroll sucessful!!)
That script is very useful. Works like charm. Thanks!
By the way, I get a similar error message with the Windows version even though the unroll process is done properly every time:
---------------------------
Exception Occured
---------------------------
Message: Local variable ‘tempGroup’ referenced before assignment.
Traceback:
line 73, in MultiUnroll, "D:\PROGRAMI\Rhinoceros 6\scripts\Unroll multiple surface with offset space between\MultiUnroll.py"
line 82, in <module>, "D:\PROGRAMI\Rhinoceros 6\scripts\Unroll multiple surface with offset space between\MultiUnroll.py"
---------------------------
OK
---------------------------
Which version are you using? There are a bunch above, here is the latest. In my library I don’t see a Mac version anymore and nothing older than 2015 (the ones above look like they are all from 2014), so I assume at some point in the past the Mac limitation got removed, and the following works on both Mac and Windows… let me know if it doesn’t. This one uses the RhinoCommon unroller function, so no scripted Rhino commands.
I used the version that’s uploaded by you on 13th December (MultiUnroll.py (2.8 KB)). I quote it here just in case. The rvb file can’t be downloaded, nor the other versions. Maybe their upload period expired?
The latest version definitely works better. No error messages at all, and I can see some improvements in the command line options. This functionality is so good that it deserves to be a native part of Rhino.
I think that is just another case of old attachments that got lost when we had the Discourse server crash a while back. But it doesn’t make any sense to use the .rvb or any other older version anymore anyway.
This is not a problem with the script itself - it’s with how you are running it. But that is an old version anyway, I suggest you download the more recent version and try that.