How can I show the relative coordinate between two Dummy

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

How can I show the relative coordinate between two Dummy

Post by Ken » 12 Sep 2019, 11:24

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.
Image

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

Any help would be appreciated.Thank you.


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

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

Post by fferri » 12 Sep 2019, 14:50

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

coppelia
Site Admin
Posts: 7330
Joined: 14 Dec 2012, 00:25

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

Post by coppelia » 13 Sep 2019, 12:07

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

Post by Ken » 14 Sep 2019, 05:45

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.

https://drive.google.com/open?id=1_3B0B ... Vl7sgScpwt
https://drive.google.com/open?id=1ovdtZ ... Q_nmgNdJnA
https://drive.google.com/open?id=1s6KJH ... KKnleaeAz2

Post Reply