Culling anchorpoints

Hi everyone !
I am trying to define ankerpoints for my kangaroo model. the points marked in red should be culled.
More specific:
all middle points of these red lines that have a smaller distance to all other points than to the end points of the red lines .
It works for the three lines on the right side(first 3 in gh) but not for the other ones (last 3 in gh) and I don’t know why because there doesn’t seem to be any difference.
Does anyone know how to fix this ?

Thanks in advance !

Assigned to Grasshopper category so it will be seen.

“anchor points” :question:

3. Attach minimal versions of all the relevant files

yes I meant the anchor points,
the gh file is attached and the important part is grouped in red.
cull_anchor_points.gh (31.5 KB)

I cant see your model without the 3dm - what are you trying to do anyway? are you trying to cull all the point that is on the line?

yes exactly, I want to cull all points on the red line.
The outline is internalized and the model should be created with kangaroo.

Hi Cevanna,

are you aware that your lines form some sort non-linear polyline?

if not, you could make it with discontinuities:

cull_anchor_points_BDE.gh (39.2 KB)

although it’s a slightly lazy solution and unorthodox (@Joseph_Oster probably will rightfully rip the solution into pieces), I think it might show you a possible solution depending on the flexibility of your constrains.

another (very similar) approach to replace discontinuities, would be a graham scan to obtain the hull or edge points only depending on how you handle straight segments or angle tolerances. (you want to delete them as well as left-turns) This will work only if your lines are not concave towards extern. convex will be handled just fine. EDIT: logical error on my side, forget about graham scan, it wont work as its hull, which doesn’t fit your needs.

From what I understand, the biggeset problem you have is the non-linear polyline.

hope this helps

Ben

Similar to the solution by @benedict but using Mesh Shadow component to get starting polyline then shatter at discontinuities, cull unwanted segments, and explode gives desired points.

cull_anchor_points_kr01.gh (40.7 KB)

-Kevin

1 Like

WHAT :question: :exclamation: I have zero in this topic so haven’t looked at any files posted here. :zzz:

Usually you provide very nice and precise solutions, once you’re interested in a topic.

I thought you were already interested in this topic. :slight_smile: sorry if I assumed wrong.

Thank you !