# Counterclockwise arc from Startpoint, Endpoint and Centerpoint

I’m stuck on something wich seems simple but I cannot seem to figure it out.
I’m trying to create an arc that runs counterclockwise where I have 3 points: The start point, End point and Center point

I came across this topic C# how to create a Arc(center, start, end) but the solutions given there don’t work in all cases considering the arc needs to run counterclockwise

This is what I have so far

Works in some cases

But doesn’t as soon as I cross the imaginary line connecting start and endpoint:

Your measured angle have unspecified plane, so it will return the “shortest” angle between two vectors.
With unspecified plane you’ll never get angles greater than Pi.
Instead, by specifying a plane, you can measure the whole range 0 to 2*Pi …

Use your Pl plane as input for P for Angle component.

That seems to works for the position the points currently are in:

But as soon as I rotate everything 90 degrees I get a wrong solution as the curve is not counterclockwise:

I think this was the same issue for the example in the other topic I posted.

I haven’t checked your files, sorry.
If your 3 points do NOT define the plane you are working to, then I suppose you want to work planar world XY plane? (otherwise “counterclockwise” means nothing…)

In that case, create a plane simply with a XY plane component, origin at your center, then align your plane with the vector origin-start, then again measure the angle as said before, using that plane.

1 Like

@maje90 Thanks! Seems like I was using the wrong way to construct the plane. In my solution the plane had no defined Y access which I think was what’s causing the issue.

1 Like