Author Topic: X Y Z A B C to grasshopper plane  (Read 395 times)

Matt Johnson

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 3
    • View Profile
X Y Z A B C to grasshopper plane
« on: February 19, 2019, 01:10:34 AM »
I'm trying to move my Kuka to a position in space, record it's Actual Position (X Y Z A B C), and then make a plane in Grasshopper to match that position so I can return to it in future programs.  XYZ is straightforward enough, but can anyone shed light on how ABC translates the axes of a plane? I've tried simply rotating a World XY plane around the World Z,Y, and X axes in turn, but that doesn't work.  Thanks for any thoughts!

lim_zhang

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 10
    • View Profile
Re: X Y Z A B C to grasshopper plane
« Reply #1 on: February 19, 2019, 09:25:10 AM »
google euler angle
« Last Edit: February 19, 2019, 09:27:05 AM by lim_zhang »

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 853
    • View Profile
    • Robots in Architecture
Re: X Y Z A B C to grasshopper plane
« Reply #2 on: February 19, 2019, 12:37:17 PM »
Hello,

Take care that the transformations need to be in the right order and depend on each other.
So if you rotate around one axis, the next rotation axis usually gets transformed as well.
I'm not on my development PC at the moment so I cannot look at the code right away unfortunately. Just remember that KUKA|prc by default uses X as the tool axis.

Best,
Johannes

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 853
    • View Profile
    • Robots in Architecture
Re: X Y Z A B C to grasshopper plane
« Reply #3 on: February 19, 2019, 12:39:47 PM »
I found a useful file that I made a while ago, see attached.
Note that there isn't just one solution, so if the values don't match up it might still be correct.

Best,
Johannes

Matt Johnson

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 3
    • View Profile
Re: X Y Z A B C to grasshopper plane
« Reply #4 on: February 22, 2019, 06:00:38 PM »
Thanks for the script Johannes, it works perfectly!  I didn't realize that I had to do the B and C rotations around the transformed axes from the previous rotation. 


Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 853
    • View Profile
    • Robots in Architecture
Re: X Y Z A B C to grasshopper plane
« Reply #5 on: February 22, 2019, 06:01:45 PM »
Great!