I have an application where it is important to check if a 3D polyline revolve fully around an axis. Here's two example where the polylines do revolve around Oz:
[![enter image description here](https://i.stack.imgur.com/scwYT.png)](https://i.stack.imgur.com/scwYT.png)

And here is an example where it does not:
[![enter image description here](https://i.stack.imgur.com/0bkc2.png)](https://i.stack.imgur.com/0bkc2.png)

One constraint I have that all polylines are connected (i.e the first and the last vertex is the same). Any ideas? Thanks.