Hello Guest it is December 15, 2019, 08:52:23 PM

Author Topic: Tool Finding  (Read 959 times)

0 Members and 1 Guest are viewing this topic.

Tool Finding
« on: January 08, 2018, 02:47:57 PM »
I heed some help with finding the current tool edge. I working on a XYZ 0. I got it to find XYZ 0 but the setting is to the side (XY) of the tool not the center. Any help with the lua code would be great.
Thanks

Stop Drop and Roll

Offline Chaoticone

*
  • *
  •  5,634 5,634
  • Precision Chaos
    • View Profile
Re: Tool Finding
« Reply #1 on: January 08, 2018, 04:12:22 PM »
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Tool Finding
« Reply #2 on: January 09, 2018, 09:20:05 AM »
I,m working in the Lua code with a coroutine. Got everything working finding all XYZ just need to get the center of the bit not the edge on the XY.
Thanks for your help
Stop Drop and Roll

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
Re: Tool Finding
« Reply #3 on: January 10, 2018, 04:10:30 AM »
You can get the center of the tool by using

Code: [Select]
local center = mc.mcToolGetData(inst, mc.MTOOL_MILL_RAD, 1);
assuming you are using the tooltable, from here you can add or subtract it to your XY Coords

DazTheGas
Theres always time for a choccy biccy
Re: Tool Finding
« Reply #4 on: January 12, 2018, 11:18:42 PM »
Thank for the help...
I got this to work
Stop Drop and Roll