Curve loops wrong

Hello :slight_smile: I am trying to create a wavy curve between two curves, but i am having some problems with them in the corners. Instead of following an ‘S’ type of shape, the wavy curve loops in itself at the corners. Do you know why this happens and how to change it?
Thanks


1st proposal.gh (19.4 KB)

missing

Your code was too complex for me so I simplified it. I divide the outer curve and shatter it on the points to get midpoints for Crv CP on the inner curve. Too many points makes the weaved curve “pointy”. When the number of points is not an even multiple of four, the corners are not the same. 32 might be the maximum? Depends on the offset value.

The NURBS curve is only for comparison.


weave_2024Aug2a.gh (12.2 KB)

Dear Joseph, thanks a lot, the code is simpler and easier to understand. I am trying to achieve a curve like in the first image. And am trying now to maybe modify the curve using graph mapper, because I cannot seem to achieve it using the code you sent. But i am only able to create a wave on the top and the bottom of the rectangle. Do you maybe know why this happens?

1st proposal.gh (29.1 KB)


Using graph mapper isn’t the best choice for this. I adapted version ‘b’ from here to get the sine curve (white group):

And using ‘X’ or ‘Y’ vectors isn’t correct either, the vector needs to be relative to the curve. I used the ‘Y-axis’ vectors from HFrames.

I added the purple group to get multiples of four ‘Cycles’ but that could be skipped. I spent some time adjusting Seam but finally gave up and ripped out that code as it was getting too complex - but it could be explored if you are up to it. :thinking:


sine_2024Aug2b.gh (18.4 KB)

P.S. Seam can be adjusted something like this, but I was trying to derive the slider value automagically so it adapts to different values of ‘Cycles’.

Like this! Using cosine instead of sine and yellow group(s) keep the peaks at the corners.


sine_2024Aug2c.gh (23.6 KB)

This is great, thank you so much!! :slight_smile: