Contour to create infill

Hi guys, today I’ve the following problem.
I should create a kind of infill inside a closed curve. The algorithm I created perfectly works for convex curves, but when I tried some concave curves something went wrong. How can I fix it?

Contour.gh (12.6 KB)


Hello
I am not sure it is so simple. I have done many infill strategies. But I searched making a closed curve. Here you have an opened curve. It must work if the infill is rotated. If not you will have some problems. Try to draw what you want, and you will see the problems or the strategies to take it into account.

See there what I have done

1 Like

I’m sorry @Joseph_Oster, I can see just the image you attached but not how you got the 3 curves

By hand. It illustrates the difficulty of writing code to solve this. If three separate curves are OK, some kind of loop might get there but… definitely not simple!

It seems you don’t read the answers. I don’t appreciate that.

Turn the contour ! And it will work


Or the infill

aaaaaa sorry I didn’t get it :joy:
yes in these weeks I’m noticing how is difficult. But for the moment working on 3 separate curves is good in any case.