Author Topic: Maths failure seeks help....  (Read 4499 times)

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Maths failure seeks help....
« on: December 15, 2012, 04:54:15 PM »
I'd like to cut some spokes in a 2" radius disc. The manual mill is occupied just now, otherwise I'd use it & the rotary table; but I also have a shiny(ish) new(ish) CNC machine sitting idle, so I figured - what the hell, programming time!

Not entirely unexpectedly, I am failing abjectly at what I want to do...

Basically, I want to leave a central 7mm radius boss, and approx 5mm radius outside rim. I've located my wheel centre at x=y=0. I figured I'd use the rather handy polar coords function on my Heidenhain 151 controller....

So, in "English", the program does the following:

Locates @ 0,0
Set circle centre
Moves out 7mm @ angle zero
Lowers cutter
Moves out 13mm @ angle zero
Arcs 60 degrees anticlockwise

[this is where it all got a bit weird in my head]

Move -13mm @ angle zero
Raise cutter
Move -7mm @ angle zero (back to circle centre)

Rotate coordinate system 60 degrees

Repeat above 5 more times.


In theory, I thought the above should cut 60 degree slices based on the original circle centre; so clearly I need to offset the cutter a few MMs each time around, to leave some actual spokes

Even if the program apparently ran from the same centre point (it doesn't) on each rotation, the angles obviously won't leave any actual spokes... I haven't invoked cutter radius / tool path compensation yet, which won't help...

So; is there a set of incantations which will cut some nice spokes? I'd be quite happy with straight ones for the time being, and no fancy variable radiuses... I'm using a 5mm cutter (smallest one I haven't broken).

Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline sparky961

  • Hero Member
  • *****
  • Posts: 844
  • Country: ca
Re: Maths failure seeks help....
« Reply #1 on: December 15, 2012, 07:57:45 PM »
Ade,

Though I definitely applaud and encourage your manual programming, I have to ask why you don't use a CAM package to generate the code?

Personally, I find being able to visualize the toolpath before going to the machine means that I can make a perfect part the first time almost every time.

-Sparky

Offline Stilldrillin

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4972
  • Country: gb
  • Staveley, Derbyshire. England.
Re: Maths failure seeks help....
« Reply #2 on: December 16, 2012, 04:17:29 AM »
Ade.
It's a very long time since I did that sort of thing. And me brain's getting old........

You're cutting out a triangle?

Start, X0 Y7.
G01 X3. Y20.
X-3. Y20 R40.
X0 Y7.

Rotate 60*. Repeat.


Stop laughing!  :palm:

David D
David.

Still drilling holes... Sometimes, in the right place!

Still modifying bits of metal... Occasionally, making an improvement!

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: Maths failure seeks help....
« Reply #3 on: December 16, 2012, 07:55:47 AM »
Sparky - as of yet, I've not learned how to do CAD properly, let alone CAM...  I might be able to draw it in Solidworks, although there's no guarantee... but then I have to get it translated into either Heidenhain (which I sort-of know), or G-code (which I don't)...

Obviously, I _do_ need to figure out all that stuff, but I reckoned, surely there must be some maths out there to do the job, that I could adapt?


David - not laughing, puzzling a bit I must admit.

Can you convert that into human speak? I've not figured out how to program in G-code yet...
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline Stilldrillin

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4972
  • Country: gb
  • Staveley, Derbyshire. England.
Re: Maths failure seeks help....
« Reply #4 on: December 16, 2012, 08:35:59 AM »
David - not laughing, puzzling a bit I must admit.

Can you convert that into human speak? I've not figured out how to program in G-code yet...

Ah! Right, Ade.

You're cutting a triangle, behind the f/wheel centre, which is  X0 Y0.
(X&Y coordinates are approximate, only, from now on).

Rapid cutter, to triangle peak, X0 Y7.

Feed to "depth".

Feed to X3.  Y20. (27mm out from centre. 3mm to the right of centre line. Giving a spoke length of 13mm + cttr dia).

Feed to the mirror image position, X-3. Using a radius of 20mm.

Feed back to X0 Y7.

Develop from there!

It was a lot easier to do on me old Takisawa. Than try to explain on here.........

David D
« Last Edit: December 16, 2012, 12:35:42 PM by Stilldrillin »
David.

Still drilling holes... Sometimes, in the right place!

Still modifying bits of metal... Occasionally, making an improvement!

Offline lesterhawksby

  • Jr. Member
  • **
  • Posts: 36
Re: Maths failure seeks help....
« Reply #5 on: December 17, 2012, 07:01:18 AM »
I have no experience of CNC but I'm reasonably ok with maths... I can't see where in your OP you mention the spoke width you need and if they're straight or tapered spokes?

Let's assume an 8mm spoke for a moment. It seems to me that if your wheel centre is 0,0, and your cutter is 5mm, you need to start at something like 6.5,9 and go down the +y direction to 6.5, (radius minus 7.5) for your first cut outwards (assuming straight spoke). That leaves 6.5-(5/2) = 4mm for half the spoke width and 7.5-(5/2) = 5mm for the rim. (I did NOT calculate the start point for an exact 7mm boss, the y=9 in that start coordinate would need tweaking)

Instead of trying to calculate the other side of the arc, if you can rotate the entire coordinate system about the origin and repeat cuts as you seem to suggest,  perhaps it might be easier to just cut the other side of the spoke (ie -6.5, 9 to -6.5, r-7,5)? IE instead of cutting the whole wedge out between rotation cycles, cut a spoke and an arc.

Even if you don't translate CAD vectors into G-code by computer, it would still seem worth drawing exactly what you want in something like DraftSight first (warning: steep learning curve ahead!) or even Inkscape (much easier, not a CAD package, but pretty decent for drawing accurate diagrams). (both are free)