## How can I show the relative coordinate between two Dummy

Typically: "How do I... ", "How can I... " questions
Ken
Posts: 3
Joined: 22 Aug 2019, 09:41

### How can I show the relative coordinate between two Dummy

Hi
I build the 5-Axis mill machine in the VRep. The AxisX is not connect to the AxisY(as below). So I put the differen dummy on both them. Now I want to show the relative distance with x,y,z between two Dummy and show them in the 3D Graph. So that I can get the tools path in the graph.

Who can tell me the method or how to do it.

Any help would be appreciated.Thank you.

Ken
Posts: 3
Joined: 22 Aug 2019, 09:41

### Re: How can I show the relative coordinate between two Dummy

fferri
Posts: 467
Joined: 09 Sep 2013, 19:28

### Re: How can I show the relative coordinate between two Dummy

sim.getObjectPosition: the second argument indicates the handle of another object relative to which reference frame we want the position.

coppelia
Posts: 7597
Joined: 14 Dec 2012, 00:25

### Re: How can I show the relative coordinate between two Dummy

To display user data in a graph, add a graph to the scene and add a new data stream to record of type Various: user-defined. Then use sim.setGraphUserData in each simulation step.

Cheers

Ken
Posts: 3
Joined: 22 Aug 2019, 09:41

### Re: How can I show the relative coordinate between two Dummy

Thank you the answer both of you. @coppelia @fferri . according to your tips I solved out and the method is simple and useful.
I show my works to here and hope to help somebody like me.

In the end I really appreciate it and thank you again.