Create a curve along another curve specifying the start and end points

I have a curve C1 that goes from points A to B, or B to A => I don’t know how this curve was drawn (Unknow start and end points).

I want to create another curve C2 along the exact same path of curve C1, but I want to specify its start and end points that are either A or B.

Is there any node that does that? Thanks!

I don’t believe you can replicate the curve just from the start and end point. I would recommend comparing the StartPoint to the EndPoint to check orientation left-to-right. If the curve is in the opposite direction of what you want, use Curve.Reverse.

Assuming you are pulling in curve geometry into the Dynamo environment, could you just split the curve based on what your other arbitrary start/endpoint along the curve happens to be?


I can’t compare the startpoint and endpoint as they will be sometimes on a vertical line, or on a horizontal line, and even on a diagonal line. Thanks for your help though!

I tried the node “Curve.SplitByPoints” and it’s creating a curve with the start point and end points switched. I want a node that preserves the order I want. Thanks though!

You can still compare the start and end, you just have to take X and Y coordinates into account. You could also get a vector from the curve (tangent somewhere or through start and end) and compare that to a specific direction. The point is that you have to know what direction you’re looking for first, compare it to the curve, and the reverse the curve if necessary.

Okay here’s the point: My end goal is to create a tangent line at the middle point of the curve and find the angle between this tangent line and x-axis.
To do that, I used the “Line.ByTangency” node and then extracted its start point and endpoint to create a vector, then found the angle between that vector and x-axis. Apparently, the tangent line (or the vector) is oriented in the same way as the curve. In other words, the vector I’m getting is directed towards the endpoint of the curve (this is not desired when the curve is drawn from the endpoint to the start point). I figured I would draw a curve with known start and end points then use the Line.ByTangency node to draw the tangent line and come up with a vector directed towards the TRUE endpoint of the curve (and not the opposite).

I think I can do the following: get the current start and end points of the curve, then compare their X and Y coordinates with the true start and endpoints. If they are the same, I can keep the vector as is, else I can reverse the vector.
This doesn’t solve the first post on this page, but helps in achieving my goal.

That’s essentially what I was trying to suggest, except that you could compare them to a known orientation (whatever you define as “correct”).

1 Like

Yes thanks! I think what confused me is that you suggested to compare X and Y with a specific direction which I don’t know! But since the coordinates of the true start and end points are known, they can be used as a reference, and your solution works accordingly…

1 Like