Getting point on arc/ parameter of arc by external vector

Hello everyone,

I have a problem, i am having trouble getting a point or parameter (doesnt matter which one) of an arc by vector, i know which vector i have and it is on the line, but how do i get the corresponding point/ parameter of this vector on the line.

I’m not sure I understand how the vector relates to the curve. Can you draw up a diagram or show an example?

The vector is based of from a line between 2 points on the curve. See my sketch below:

(The cirkel is the point i am trying to get)

If it’s an arc just create a vector from the start and end points of the arc and normalise it. Or if it’s a segment, then your start and end point of the segment from the arc.

What do you mean with that? The direction i am looking for can be anywhere on the line

If you want the point on the arc segment there are many ways, one would be to get the mid point between the start point and end point and project it onto the arc.

I think he’s looking for where the tangent on the curve matches the specified vector. Is that a more accurate description @Daan?

1 Like

Yes that is exactly what i mean, i am sorry if i wasnt clear enough (English isnt my first language)

And by the way, this shouldnt only work on arc, but also on nurbscurves and stuff

I think you’d have to create an iterative function to loop through values until you converge on a match. Do you have a working tolerance or does it have to be exactly parallel?

I doesnt have to be perfect, but as close as possible without having to do like 1 million iterations

In that case it’s fairly simple. Specify the number of points you want to check along your line and compare the angle between vectors. The closer to 0, the closer you are to the tangent. Then you can just return that parameter and get the point on the curve.

1 Like

Oh Sweet, i also tried a solution like this but i didnt think about comparing the vectors and choosing the smallest one!

Ah ok, well thats really straightforward, just compute the cross product between your vector and the ‘normal’ vector of the arc (an arc is always on a plane, so I created one using the same inputs as the arc to obtain the ‘normal’, but you can easily do this from points on the arc etc) then project the centre point of the arc onto itself using the result of the cross product.

The vector can be defined however you like.

EDIT: Also, arcs, ellipses, polygons and circles should have a GetPlane() method/node cc @Michael_Kirschner2 @Aparajit_Pratap

1 Like

Could you share this dyn file? I dont fully understand what is happening from this screenshot.

Home.dyn (22.3 KB)

There you go. This method gives an exact result.

I have checked out the problem and i do now understand what you are doing. But the problem i am having is that the curve/ arc isnt always a perfect arc. So i cant use the centerpoint of the arc, because there isnt always one

It should also work in a situation like this:

As long as the curve doesn’t have multiple tangents along the same vector (can’t remember the mathematical term right now… degree of curvature?) my method should work on any curve. With a little modification you could even get it to show multiple points with similar tangents.

1 Like

Yeah that’s fine just replace the arc with your curve but you will need to define a point to project.

Okay i will try that!

but could you explain the Point.Project node to me? I dont understand what is happening in that node and why you need an external point as input. @Thomas_Mahon

Thanks in advance!