Unrolling and re-rolling / accurate surface mapping?

I am trying to set up a grasshopper algorithm that lets me adjust text that is mapped on an unrolled surface to avoid structural members that will exist in the 3d version.

I unrolled the surface together with the lines of the structural elements (in the pic it is the teal green line).

On the left, is my unrolled surface where i want to adjust the text, then I SURFACE MAP back to to the 3D panel.

It looks good, it’s all working, but…

As you can see the mapping is not being accurate.

The flat version, the green line intersects with the E U V. In the 3D version it intersects with the E A V.

How can I do an accurate mapping?

It’s very hard to offer assistance without seeing your file. How are the surfaces parameteised?

condensed for help.gh (13.2 KB)
condensed for help.3dm (3.0 MB)

Hi dharman,

Here is a snippet of my file that captures the problem.

The surfaces are 1:1 direct from an unroll operation, so i figured the UV mapping would be compatible.

I created the 3d surfaces to be developable in the hope that it would unroll and map nicely.

I’d love to know the root of the problem and how this could be done differently.


Your test files seem to work as expected on my machine (Rhino 7,) unless I am misunderstanding something. Otherwise, make sure your flat reference surface and the curved target surface are built the same with the same degree and control point counts–this has caused small errors for me the past. You might also try the “Sporph” node to do the mapping from flat to curved surface. It has more explicit controls. Though when I tested it, I got the exact same results as in your test files.

thanks for trying that out! I’ll double check it, but as you can see in the in the pic i posted, there was something going on that didn’t have things matching up.

condensed for help.3dm (1.4 MB)
condensed for help.gh (23.6 KB)

I adjusted the files to better illustrate the error.

I am unrolling a surface along with its structural reference lines.
Then I am mapping the structural lines to a reference rectangle where I have my text.
I adjust the text left and right to avoid the structural lines.
Map to the unrolled surface (which will be cut out of steel).
Then map to the 3d surface for viewing and fab drawings. ← here is the problem

The problem is that the mapping function does not “agree” with the 3d surface as to where the structural lines go. Therefore the placement of the text on the 3d surface looks like it will intersect with the structure. When according to the unrolled version, it will not.

The goal is to adjust the text to avoid intersecting with the structure.

Any recommendations?

I’ve had a similar problem with curves, where the parameter space is nonlinear. The fix was to rebuild both curves which resulted in evenly distributed parameter space. I wonder if you can try that here? Rebuild the surfaces so that UV coordinates aren’t biased towards control points? I haven’t looked at your file so just an idea

I’ve tried by rebuilding your surfaces and they now match. note that rebuilding the surfaces will have changed your geometry slightly, so you’ll want to check that. The idea is to ensure the construction of both surfaces is the same.

condensed for help_re.gh (24.7 KB)

Awesome. I knew that the UV space was the thing messing things up.
Thanks for the help! I’ll see how the rebuild deforms the surfaces and i’ll make things work.

Hi again, I took a look at your solution, and it does fix the accurate mapping problem with the structural lines.

But it actually brings back a problem that I worked hard to resolve when building my surfaces.

Text needs to be as “non-skewed” as possible, parallel with perpendicular lines on the road-like surface:

In doing a ruled surface rebuild text now maps like this:

Is there any way to do a “re-roll”. To do the pufferfish unroll node action in reverse?

Ooh yeah I see that’s no good. Glad you’re checking my work! The ruled surface is likely the problem. Maybe you can just rebuild the surfaces? With additional control points in the long direction? Or try some other surfacing techniques?

As for re-roll you can always use surface closest point to get UV coordinates and then evaluate the other surface at the same UVs to get the re-rolled points. Not sure this is any different to the mapSrf node though.
Or maybe you can use smorph?
Sorry I’m not at a computer right now