Create lines with distance to lines

good day everyone,

First of all, I’m fairly new to grassshopper.
for me this little problem has grown into an unsolvable one

I want to create closed curves with a distance X to the ones already present, as can be seen in the attached picture.

I would be happy if someone can give me a solution or point me in the right direction

With kind regards
G Schmidt


logo geometrisch SC.gh (7.5 KB)


logo geometrisch SC_2022Jan22a.gh (22.2 KB)

Thank you very much that is exactly what I was looking for.
would not have come up with the idea of doing that with surfaces.
thanks again for the quick reply

The purple group (below) makes the offsets proportional to area so small fragments get small offsets.


logo geometrisch SC_2022Jan22b.gh (25.4 KB)

P.S. One more little flourish…the yellow group uses the offsets to make holed Boundary surfaces.


logo geometrisch SC_2022Jan22c.gh (28.3 KB)

ohh wow, now I just have to understand the whole thing so I can learn something :smiley:

thank you very much for your time

One more simple result from the same code: (yellow group)


logo geometrisch SC_2022Jan22d.gh (15.9 KB)

P.S. Exploring the model further, I found that it got confused about which of the split surfaces to ignore when I reduced the ‘Count’ slider. So replaced sorting by area with a proximity test (cyan group).


logo geometrisch SC_2022Jan22e.gh (26.8 KB)

P.P.S. Variable offsets based on area are distracting and not necessary when ‘Count’ values are low. This cuts that out so the purple group slider is just the offset value, like version ‘a’.


logo geometrisch SC_2022Jan22f.gh (24.7 KB)

still so much to learn :smiley:

And so much to learn from each model.


logo geometrisch SC_2022Jan22f2.gh (26.0 KB)

the versions I personally like best are C/D/E
I think it’s because the distance between the big holes is bigger.

But each version has something beautiful, and I’m really looking forward to milling the whole thing in different ways in wood.

The inconsistent widths of the borders bothered me, though there are other ways to write that code, to derive offsets in proportion to area, that might be smoother. Perhaps accounting for the ratio of edge curve length to area… so that triangles with long edges and small areas get smaller offsets?

OK, I’ve added a new purple group called ‘Offset Proportional To Area’ that considers the ratio of area to edge length and remapped ‘Min/Max’ settings to determine offsets for each hole. Smoother?


logo geometrisch SC_2022Jan22g.gh (34.1 KB)

There must be other ways… :thinking:

it is very smooth and I like it very much!
I’ll take my time tomorrow to study the different variants and to understand all the connections.
much to learn! :wink:

I’m looking forward to it :smiley:

Thanks a lot

I meant to reverse the sorted list output to apply the largest offset to the surrounding shape (the blue line in earlier post) but the smallest looked better? Then I realized there is no need for sorting at all since I already have the Min/Max slider values and can use either one!


Oh, let’s just code it - added an ‘EdgeOffset’ slider (Min to Max offset) in purple group.


logo geometrisch SC_2022Jan22h.gh (34.0 KB)

P.S. On second thought, multiplying the area/length ratio by area was a mistake? So offset isn’t actually based on area, only the area to edge length ratio??
logo geometrisch SC_2022Jan22hh.gh (28.4 KB)

beautiful and very clear. really good work! :+1:

I like it very much with all the different settings.
the possibility of adjusting the offset of the “blue line” is a very good idea. :grinning:

wonderful work!

The way it was wired, the ‘Min’ slider was affecting the blue line offset, preventing it from going to zero. So I added another Domain component wired for zero to ‘Max’ offset for the blue border.


logo geometrisch SC_2022Jan23h.gh (17.1 KB)

Two things:

  1. The purple group computes offsets based only on the ratio of area to edge length, ignoring actual area, so small holes will have the same offset as large holes if their ratios are the same. That’s not quite what I wanted… :thinking:

  2. I understand the negative offset for the holes but why does the blue border offset also require a “-x” expression and negative offset value?

Regarding the blue border offset, can it be that lines also have a direction?
if so, then i could imagine the reason.

my thought is that if the line is pointing in one direction, then + would be to the right and - to the left of the line.
I don’t know if that’s the case, but it just went through my head.

Good thinking! You are correct. Adding Flip Curve after Join reverses the effect of the ‘D’ (Distance) input to Offset, so the “-x” expression for the blue border offset is removed:


logo geometrisch SC_2022Jan24a.gh (37.3 KB)

The curious thing is that the “-x” expression wasn’t originally needed for the blue edge curve but something changed to affect the joined polysurface edge curve direction. :thinking:

I’m lazy though, not curious enough to answer my own question. Again, good thinking!! Keep up.