Perpendicular line to curve from given points

I’m new in grasshoper, I hope you can help me with what I’m trying to solve.

I attached a .rh file with few curves (in blue) and few points (in green). (Fig 1)
What I am aiming is to find the perpendicular line between these given points and the curve.
I start by dividing the curve in 3 so GH can limit this search and focus only in these three points on the curve. Another thing I will do is limit the given points and divide them through 6 sections (as in Fig2), again to try to limit GH to these given points when calculating the perpendicular line.

I reach a point where I’m struggling in making this ‘resulting line’ (which I’m not sure if it should be a SDL Line or just a Line) perpendicular to the initial curve (in blue).
Can anyone help me with this, please?

Thank you in advance!


make perp line through points and given curve.3dm (128.9 KB)
make perp line through points and given (11.5 KB)

You have 305 points and 6 curves ; are you want create perpendicular lines between all these points and the curves?
All perpendicular lines are radius of circles around the curves

Hi @arq.lilianacarvalho,

Ignore my other post i got confused by the PointCloud component.

After re-reading your question i assume you want to connect all points to one of the 6 curves each, although youre input curves are a bit short at the bottom to get nice results
See if this is what you are after:

make perp line through points and given (16.1 KB)


To answer your question: yes I do, tough I would divide the selection of points as showed in Fig2 - to limit the range of solutions.
Tough this a very useful strategy/thinking you showed, as I might create a dimension range that sorts out the lines (radius of circles) I’ll choose from.

The closest points to the curve lines given (blue) should be the ones to choose, tough I might use this structure to limit my ‘frame of choice’ through a dimensional value.

Thank you so much!


Thank you! Yes it is :slight_smile:

I will now apply a range for their dimension, so I will understand which lines to pick from.
I guess I got confused with the perpendicular bit.

Thank you so much, just saved my day!

Lando.schumpich, can I ask you one thing?

Why do I have to graft the Crv CP and the element B on component Ln? Why are the component related with points need to be graft? I’m sorry this must be basic, but I’m new to this and details matter :expressionless:

thank you in advance

@arq.lilianacarvalho, this video by david who created grasshopper might help you understand a bit why i grafted the CrvCP .

basically i want to find the closest point for all 6 curves thats why i graft the input of point, then gh automatically matches the data and returns a datatree with the same number of branches as the number of input points, each containing 6 elements (one closest point for every curve).

Thats pretty much the same as using list item on your 6 curves and vreating one CrvCP per curve but way less work and easier to change.
Learning about datatrees in general will really benefit your grasshopper definitions :slight_smile: