Discontinuity bug?

DiscontinuityBug.gh (5.9 KB)
Tested in Rhino 6 and 7.

Hi @Dani_Abalde,

The result looks similar to the attached.

test_discontinuity.gh (9.0 KB)

What am I missing?

– Dale

I think it happens because the point is exactly in the perfect mathematical average between the previous and the next one:

otherwise it would be there:

DiscontinuityBug_.gh (16.2 KB)

There are more points in a straight line, why only one is not captured?

Shouldn’t this algorithm have tolerance? The polyline is a discrete curve so by definition it is not continuous at its vertices, but ok, let’s consider the polyline that forms a straight line as a special case that breaks this, shouldn’t there be a tolerance to set when it is considered a line?

I hadn’t noticed that, so looks like it is not about the line case as I thought but seems to be an arbitrary heuristic (because I do not see how this difference can emerge from geometry). Or @dale, do you have a better explanation of what’s going on?

Not sure if that’s what I’d expect or not, but I tend to use the vertices from explode when looking for polyline points.