Unroll Surface not working in grasshopper

When I use the unroll command in Rhino, the surface seems to unroll normally.

However, when I use the same code in a GhPython, things go haywire. Sometimes the development doesn’t even come out and it gives the error “Not set to instance of an object”.

Every time I tried this, it worked flawlessly in Rhino. Whenever I tried the same in grasshopper, it didn’t seem to work. Is this a bug, or am I doing something wrong?

unroll surface not working.gh (13.6 KB)

image

The red is the unroll that GH did and the blue is the one I got with rhino.

I can’t explain why the Rhino command even works with your surface.

It seems to be a doubly curved surface and unrolling doesn’t work well with those.

If you would take just the two long edges of your surface and loft these two edges, the resulting surface can be unrolled without problems.

1 Like

Thank you for your reply.

I don’t think it is a doubly curved surface. The original surface was created using a ruled surface and 2 curves. The only difference is that I trimmed it.

Anyway, even if the surface is doubly curved, if it is working in rhino, why wouldn’t it work in grasshopper? After all, it is the same command that is being used

I think you’re right.

After shrinking the trimmed surface, the unroll command in Grasshopper worked fine.

unroll surface not working.gh (11.7 KB)

@martinsiegrist

That’s interesting to see. I will check if it works on other objects and get back.

But can we conclude that it is indeed a bug that the command doesn’t work in grasshopper?

I’m recategorising this under developer, since it’s a RhinoCommon issue.

Rule surfaces can have double curvature. Only a subset of ruled surfaces are “developable” which means they have single curvature. Very simple example of a ruled surface with double curvature is a ruled surface created using two straight lines which are non-planar.

1 Like

@davidcockey Yes of course, you’re right, my mistake. What I meant to say was that the surface should be developable since it is specific type of ruled surface

@DavidRutten

I am not sure that I follow. Does that mean that it is a bug, or that you are re-categorizing this thread?

I meant is just code using RhinoCommon and not getting the same results as the equivalent command. The fact that you’re running the code via a grasshopper component doesn’t really matter.

It may well be a bug, maybe the UnrollSrf command does some additional processing which should be part of the sdk function.

1 Like

@DavidRutten Thank you for explaining it and for your help in escalating it. I will leave it as unsolved till the time it is fixed, in case someone else happens to stumble onto this later