# Pattern Projection via FlowAlongSrf

I have an interesting problem. I need to project a pattern along a surface with double curvature.
The standart method is to use FlowAlongSrf in Rhino, or use the Map to Surface component in Grasshopper. Usually good enough. In my case I have a limitation. The material to be used for the test is a 2D pre-printed sheet with a pattern. In order to unroll the surface with double curvature, I need to split it into smaller surfaces, which then I mesh with a triangular mesh and turn into a brep. After this I unroll the brep together with projected curves.

However the panel which I get as a result has the pattern with a distortion. This is because there is no way to account for this distortion via the standart FlowAlongSrf workflow.

Of course, it is mathematically impossible to have a perfect projection from 2D to 3D and then back to 3D when we have double curvature. But I wonder if there is some method or trick which will make this approximate method an idea more controllable. My idea is to maybe account for the distortion durring the FlowAlongSrf step.

I hope anybody has an idea.

Pattern Projection.3dm (3.2 MB)

Pattern Projection.gh (21.1 KB)

Update: I have managed to get very good results using the Squish command. Is there a way to use Squish and SquishBack in Grasshopper?

Hi!
Have a look here https://www.grasshopper3d.com/forum/topics/using-squish-from-rhino-with-a-c-vb-or-python-component
On the second page of comments it seems they have done also squishback…
Tell if you still have problems.

1 Like

Thanks man! Cool avatar btw. Good taste

check these as well:

1 Like

Btw, if you open the first Link you have send me… You’d see that I have to read my own asnwers to somebody elses questions

1 Like

In any case thanks for the links, because they do exactly what I need! Thank you guys a lot

1 Like

I can’t find a squishback component though…

The brep must be referenced from Rhino for the component to work it seems.

Additionally I felt bad for pointing you to no solution.

So I tried to solve your problem

check:Pattern Projection_help01.gh (127.9 KB)

1. split/trim the whole untrimmed surface with all projections (slow) then bake, then squish with rhino, or with the python component from the links earlier - revise results:

2. cheat it this way, your logic and mine combined to achieve more control and pick between strips:

It continues to use ggUnroll, I compared measurements manually - I hope it helps

1 Like

Sorry for the late reply. Looks absolutely amazing! Can’t wait to go to the office and play with it first thing in the morning. At first glance it does look like the best results I have managed to obtain myself, but you surely help me a lot connecting this method to Grasshopper in a better way! Cheers mate!