Hello Guest it is December 09, 2019, 08:51:28 PM

Author Topic: Any new WIZARD ideas to work on ???  (Read 25393 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Any new WIZARD ideas to work on ???
« Reply #30 on: October 19, 2012, 02:47:19 AM »
By the way. Changed my code to work in degrees mode so that toolpath would display more meaningfully. See attached. It didn't occur to me previously, but this way the debugging is easier. Interestingly the toolpath produced by my code consists of almost straight lines, while yours of curved lines. So based on the fact that mine did produce flats somehow, I would assume that there is a problem with yours  ???.

Dan
« Last Edit: October 19, 2012, 02:49:00 AM by Dan13 »
Re: Any new WIZARD ideas to work on ???
« Reply #31 on: October 19, 2012, 07:06:01 AM »
Plus it stays in absolute mode G90, I've never been a fan of G91
That's cool code Dan

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Any new WIZARD ideas to work on ???
« Reply #32 on: October 19, 2012, 08:01:51 AM »
Thanks Ya-Nvr-No.

Terry, thanks to your idea of utilizing the toolpath display I was able to debug the code and now have a perfect working version. It works very well. With my approach the minimal number of flats is 3. See attached final code. I have also cleaned it up a bit and added some more comments for readability. Works very well here and I am pleased.

Here is a short video showing it in action:

http://www.youtube.com/watch?v=DajrTlI8IWA&feature=youtu.be

Took less than a minute to cut this.

Dan
Re: Any new WIZARD ideas to work on ???
« Reply #33 on: October 19, 2012, 08:23:01 AM »
that's cool Dan but what a strange noise it produces.
Is that a PVC Plastic Rod?

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Any new WIZARD ideas to work on ???
« Reply #34 on: October 19, 2012, 08:31:19 AM »
What noise do you mean? Two sounds are there - one of the X stepper and the other of the A axis which has very high acceleration and hence you here it as knocks. Material is delrin.

Dan

Offline Chaoticone

*
  • *
  •  5,633 5,633
  • Precision Chaos
    • View Profile
Re: Any new WIZARD ideas to work on ???
« Reply #35 on: October 19, 2012, 09:46:16 AM »
Looks Good, makes my ball screws hurt though.  ;D
 
Brett
;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!

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Any new WIZARD ideas to work on ???
« Reply #36 on: October 19, 2012, 09:52:43 AM »
;D

Dan

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Any new WIZARD ideas to work on ???
« Reply #37 on: October 19, 2012, 11:25:58 AM »
You did good DAN, What I am working on has a couple of good points. You do not have to know what the flats distance is Just what the shaft diam is and the # of flats.

A simple set of  Question boxes for the inputs will work fine.

THE ugly part of it is the MATH to swing an arc into and out of a cirlce (;-) Still working on that part.

GUYS G91 can be your friend OR your enemy.

I have an old hit and miss engine here that sounds a LOT like that.


(;-) TP

Offline Dan13

*
  •  1,244 1,244
    • View Profile
    • DY Engineering
Re: Any new WIZARD ideas to work on ???
« Reply #38 on: October 19, 2012, 11:48:14 AM »
Thanks Terry. Reason I did it with the distance across flats is that usually that would be the known parameter as dictated by standard wrench sizes. I can see though where the shaft diameter would be rather convenient. Anyway not a problem to derive one from another. What I do like in your approach is, as I mentioned, the option to do this in multiple passes.

Yes, the math with arcs is going to be painful. Interesting how it will work out.

Dan

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Any new WIZARD ideas to work on ???
« Reply #39 on: October 19, 2012, 12:33:21 PM »
Dan I redid the front end of YOUR code to solve for the Flat lengths based on Diameter of shaft and #of flats.

D  =  Diameter of shaft
C = angle of flats (360/#flats)
R= (D/2)  Convert to Radius

Chord length = ((2*R) * Sin(C/2))

NOW you can input the major functions via front end macro to program the Polygon function.

Shaft Diameter
#flats
Flat length

It does the same thing as you did only makes it a touch easier for the OP to program on the fly.

Just a thought, (;-) TP