The best way would be if the SDK gave you the center curve. That would make it easy to figure which are connected. Counting may not work because composite surfaces may produce multiple connected fillets when used as base surfaces.
Again the center curve would make it easy to tell if the direction reverse.
But what you want to do is way to complicated. Just check the edge curves if the direction changes by more than 45 degrees then end the chain. The fillets are supposed to be tangent. Their edges should be close to tangent. If the edge direction changes more than 45 degrees something is probably wrong. If the edge change 180 degrees that’s completely wrong.
That’s a pretty loose tolerance I think the angle should be Atan(abstol)/R where R is the fillet radius and Abstol is the doc absolute tolerance.
The red fillet is on the black surface and the orange fillet is on the blue surface and the blue and black are not tangent at that point. The normals differ by .89 degrees. That’s a lot. The tolerance needs to be tight if you want the fillets to join properly. You might want to mark the edges with a dot that are close to being in tolerance and then the user could know those edges will need to be matched so that they join properly. Otherwise the chain will stop when the normal test fails.
If you find that both corners have the same new surface that passed the normal test, that surface is probably an existing same size fillet or a blend. So you should stop the chain if you don’t want to run over existing fillets.
I get that but the loop should have stopped at the last red fillet if the normal test had been tight enough.