Is my curve a straght line or an arc?

Hi!

I need Dynamo to determine if a line is a straight line or an arc. The reason for this is that if the curve is a straight line, I need only to extract the start and end point, but if the curve is an arc, I want to extract either the arc center, radius and start/end points, or to divide the arc into, for instance, ten points along that arc.

I am aware that I could just divide all curves into a number of points, but this would result in way too many points in my final list of points.

Any help would be appreciated!

Best regards
Klaus

1 Like

Use the Line.Direction node as bool mask. If it fails, its an Arc. Using the bool mask generate a count of points, i.e. true = 3 else = 2. Then create points along curve using this result.

2 Likes

LineOrArc.dyn (5.4 KB)

8 Likes

@Thomas_Mahon, doesn’t the Line.Direction node expect the input to be a line though? I’m seeing that it will not accept curves as the input unless there’s an intermediate step that works for this example?