How to judge whether the order of 2 groups of points in 3D space has changed in space?

As shown in the figure below, the points of the closed curve on the left are arranged counterclockwise. The open curve on the right has a change in the order of points in the square. The two groups of points are two-dimensional np.array with the point number as the index. : How to judge that the group of points on the right has changed in spatial order?

If the point ordering outside the square remains constant, the first suggestion coming to mind is to compare distances along the curve between points inside and outside the square. If point 11 is closer to point 1 than point 10, you may know that point 11 is not in sequential ordering.

The left points and the right points

  1. The problem to solve has changed. You declared open and closed curves in your OP. The markups files that you post are Fiducial ones.

  2. How does ordering of points change ? By code that is controlled by the developer ? By user UI actions ?

  3. How is ordering of points relevant for a Fiducial node ?

It’s hard to try solving a vaguely posed problem, the more so if it’s dangling.

这个问题困惑了我好久–就是如何判断表面是否闭合, 尝试过一些方法都不理想, 后来我发现生成的点云的顺序在闭合时,按一定方向(这里是顺时针)规律排布, 而非闭合时, 其空间顺序发生了改变, 所以就有了上面👆🏻这个问题

This question has puzzled me for a long time - how to judge whether the surface is closed…I have tried some methods, but none of them are ideal.Later, I found that the order of the generated point clouds is arranged in a certain direction (clockwise here) when it is closed, but when it is not closed, its spatial order has changed, so there is the above problem :point_up_2:t2:.
How to extract the vertex coordinates of a polygon of a model in the current section?
How to judge a curve model obtained with vtkplanecut or vtkcutter is closed?

昨天我搞出了一个函数,计算每个点相对于质心和初始点的夹角…如果按照夹角的角度排序, ‘闭合’状态顺序不变, 顺序发生改变就是非’闭合’.

Yesterday I came up with a function that calculates the included angle of each point relative to the center of mass and the initial point… If you sort by the angle of the included angle, the order of the ‘closed’ state remains the same, and if the order changes, it is not ‘closed’.
image

image