Polyline offset normal by ratio based on distance from center. Help!

Hi everyone,

I am writing to ask for your help with a Grasshopper definition.
I have a bunch of lines that are mapped to a surface, and I would like to offset them from the surface normal by a ratio. The ratio would be based on the distance of the line from a central point.

I would usually get the end point of my line and the normals and offset those. This works for a constant offset, but when I make the offset a multiple or factor of the distance from the center my start and end points are in different relative places when I sort curves.

I have attached an image and Grasshopper definition with internalized curves. The only plugin on is bifocals, which I have used to make it easier to understand the screenshot.

I would be very grateful if anyone could help me with this.
:grinning:
Thank you!


Lineoffset_byRatio_Sort_06-10.gh (416.8 KB) :grinning:

Lineoffset_byRatio_Sort_06-10 Edited V0 Line Topology.gh (399.4 KB)

Honeycam 2023-10-07 11-12-57

1 Like

Master Quan Li!!! OMG. You rock. So you used the remaper and then added a graph mapper to make it way more cool. You are incredible. Thank you so much once again!

Quan Li where did you learn about those sandbox tools ? Did you work through the example files on sandbox?
I am seriosly amazed at how you always find these eloquent and precise solutions. This forum is very fortunate to have you.

Thank you!
I learned it from posts on this forum, but I don’t remember which ones.
In my opinion, the real masters are here :grinning::
Top Grasshopper topics - McNeel Forum