Starting point for UnrollSrf

HI,
It seems to be that surfaces created by UnrollSrf command are placed on Top viewport from 0,0 World Top CPlan. I have a question. Is this any possibility to “tell” Rhino 5 where these surfaces should be created? (see picture)
I would like to change the starting point for these surfaces because these surfaces are created at the same place where other objects are and in many cases it is very difficult for more complicated projects to select or modify these new surfaces.

Hi,

Just made this for you. Install this plugin for your rhino.
2 commands:

Unrollsrf2 - like the normal unrollsrf but then with movement edit
Unrollsrf2edit - a popup opens and asks for the position to move to. He moves from w0,0,0 to - Your position. :smile:

You dont have to unrollsrf2edit every time you use it. It remembers last time information that you told him :slight_smile:
So unrollsrf2edit is for editing the position and unrollsrf2 for the command.

UnrollSrf2.rhp (19.5 KB)

Maybe someone else knows a better way?

Cheers

1 Like

Hi,

Many thanks. It looks that this it is what I’m looking for.

No problem. Good luck.

At a cruder level than the plug-in solution, a macro:

! _UnrollSrf _Pause _Pause
_SelNone _SelLast
_Move W0,0,0

-Pascal

@jordy1989 this is nice. Now if you can build in an automatic incremental offset from w0,0,0 that would be fantastic. Imagine unrolling 50 complex surfaces and you want the final unrolled surfs to not be stacked up on one another at the unroll point. I don’t want to have to manually edit that point every time before unrolling.

I’ve been using my own macro for this for a while, like pascal’s, but could use an update.

Dont have time in the weekend. Ill see what I can do on monday. Ill make it that you can set the distance and nr 1 will be on like w0,0,5. 2nd on w0,0,10 etc.

Sweet! I would need to be able to set the offset distance increment. Some times the surfaces are huge (30’), sometimes small (1")

Understand what you mean. You have to select all unrollsrf then press enter and it will offset. Will fix it on monday. If you can wait xD

Here is an old script I have that does multiple object unrolling with automatic spacing.

–Mitch

MultiUnroll.rvb (2.7 KB)

1 Like

ooh Mitch! That is very nice thank you (kicking myself for not asking you about this sooner!)
Can you add the ability to unroll curves along with the surfaces or is that getting complicated? Maybe you have a GH def up your sleeve for that?

I suppose it is possible to add curves to the multi-unroll script, the problem is there will be a lot of testing to see which curves among all selected lie on which surface/polysurface in order to associate them… and it appears that particular function is not so easy to program…

–Mitch

humbug!
But wait! This makes me think of the standard rhino unroll process: if we preselect a surface with curves both on it as well as no where near it, the surface and curves within tolerance are unrolled no problem, automatically leaving the curves out of tolerance in the dust. Perhaps this could be useful in the solution? I haven’t cracked open your rvb yet but maybe just preselecting all the surfs and curves together will be ok? Is there something in the script that is keeping me from selecting curves?

Yes, initially I assumed that would work… But it in my tests on different hings I couldn’t get it to work correctly (I need to try again, however). However, I have a more or less working solution now with a slightly different tack, just need to clean it up. I have to go out for awhile, so I will post it a bit later once I have time to finish it.

–Mitch

OK, that was just me being stupid, it actually does work, there was just something wrong with my test setup… Attached is a new script that should unroll curves with surfaces/polysurfaces. If you hit Enter without selecting any curves, the script will also work as the normal unroll does. I also added the choice of a start point pick/keyboard entry for the unrolls. Let me know how it works. For the Mac folk, I am also working on a similar script in Python… maybe tomorrow.

–Mitch

Edit: small fix added

MultiUnroll.rvb (3.0 KB)

2 Likes

oh man. you did it. thank you for this!
someone needs to start a dedicated ‘most useful script/plugin’ category. multiunroll would be there.

Here are two Python versions - one for Windows and one for Mac…

(unfortunately, rs.GetBoolean() is not yet implemented in the Mac version of Python rhinoscriptsyntax yet, hence the second version for Mac.)

I also made one more change the the vb version, so I will post it here also…

At some point I will re-write the python version using RhinoCommon to avoid calling rs.Command for the unroll, but I’m being lazy right now. :relaxed:

–Mitch

MultiUnroll.rvb (3.0 KB)
MultiUnroll.py (2.8 KB)
MultiUnrollMac.py (2.9 KB)

3 Likes

I would like to say big thanks for all of you. I had only a few minutes to try but seems to be all the scripts, especially yours Mitch, will be very useful for me and simplify my everyday work. Many thanks again.

Regards,
Michal

Sorry, It’s one of the first time I’m on rhino.
I have rhino for mac, with python run RunPythonScript working (I think).
I’m drawing a sphere with Solid > Sphere > Center, radius. Then I run the python script MultiUnrollMac.py and I can’t select the sphere. If I press enter few times I get the error:

Exception Occurred
Message: Local variable 'tempGroup' referenced before assignment.

Traceback:
  line 75, in MultiUnroll, "/Users/alberto/Downloads/MultiUnrollMac.py"
  line 84, in <module>, "/Users/alberto/Downloads/MultiUnrollMac.py"

Sorry I’m really new to rhino

Hi Alberto,

I cannot test it as I have no Rhino for Mac,
I would however suggest to draw something that is unrollable; a cylinder or even just a box.
A sphere cannot be unrolled and that might be the cause of your error.

_Willem