How to make markupsnode follow mouse cursor

Operating system: window 10
Slicer version: 5.2.1

When you click on the markup node above in Slicer’s GUI interface, the markup node will follow the mouse cursor until it generates a mouse click event in the 3D view. How can I implement this in code?

What you describe is already the current behavior. What do you mean by how can you implement it? Do you want to reimplement the feature in another application?

I think slicers have loose cell, point picker functions.

What I mean is, when I create a markupNode on the mesh, visually it looks like the markupNode is attached to the mesh, but when I actually create a 3d point cloud and check it, I can see that the distance between the mesh and the markupnode is not zero.

So I’m trying to add an algorithm that makes this distance difference zero by utilizing OBBtree, vtkPointPicker, vtkCellPicker, etc.

Therefore, when rendering on the 3D view by selecting one of the Markupnodes through the GUI, we are trying to add a condition that prevents rendering if the mesh and markupsnode are separated.

When you place a markup point on a visible surface, it is placed exactly on the surface.

You talk about point clouds. Maybe you expect the point to snap to a mesh point? We don’t do that because a mesh can have huge cells, so the point would be placed very inaccurately. In general, if you have a mesh then use it as a mesh; treating it as a point cloud would be a huge downgrade (you would discard very valuable information).

If you can provide a script and instructions that reproduces some unexpected behavior then we can investigate.

If you take a control point on the Mesh (Stanford Bunny) through ClosedCurveNode, there is a line connected by a curve between the control points.

For ClosedCurveNode, if you proceed with the ‘Resampling’ process through the options shown in the picture above, another control point is interpolated on the curve between the control points.

Are the options specified in the picture above resampling while ensuring that even the curves between the control points are attached to the mesh?

The point cloud mentioned above is what I said wrong. During the ClosedCurveNode Resampling process, there seems to be a phenomenon in which the newly created control point is not attached to the mesh. Is there an option to set this inside the slicer?

I am picking with the IntersectWithLine function through the OBBTree for the mesh, and I am wondering if there is another method other than the above method.