Gallery, Projects and General > How do I??

Maths help please: Approximating a Flat Iteratively

<< < (6/13) > >>

RussellT:

--- Quote from: efrench on June 14, 2019, 04:05:49 PM ---You all are working too hard  :D Review my posted diagram.  By using one leg of the right triangle as a line perpendicular to the midpoint of the flat, there is only one right triangle to solve for. The cutter is always tangent to the flat.

--- End quote ---

I think your maths is right but incomplete.  In your diagram B varies with the angle to which the workpiece is rotated.  You need to use
 A * tan(angle) = B and then apply Pythagorus.

Russell

Archie Opteryx:
I wondered how large the scallop cusp heights would turn out to be, so I plugged some numbers into my equations. The answer is - surprisingly small!

Using figures from Andrew's post above - 25mm diameter stock with 18mm spanner flats, a 10mm diameter cutter and 1 degree angle steps - the cusp heights go from 0.0015mm near the centre to 0.0029mm near the edge of the face. I don't think many spanners would complain about that.

Larger cutters reduce these heights further, and it should even be possible to use larger angle steps and still get good results.

I've attached a simple spreadsheet for anyone who wants to play with the figures. This a zip file containing a .xls document. If you have any trouble with it, please let me know.

So it looks like the technique is viable, in theory at least. Now we need to see how it works in practice, so, Andrew, over to you   :wave:

The generating equation x = (d+r) / cos(alpha) is nice and simple, and I notice that your Siemens controller has a cosine function, which I'm sure it would love to use. Dividing a constant by a cosine shouldn't put much strain on the CPU, especially since it only has to be done once for each spindle angle.

I would find it fascinating to see a machine produce a flat surface from circular movements. It's one of those "impossible" things, like the drill that makes square holes.

awemawson:
So it looks like the technique is viable, in theory at least. Now we need to see how it works in practice, so, Andrew, over to you   :wave:

It was my intention to do just that today but I got diverted - nice weather so I started paint stripping the trolley for the vacuum former and was about to start spraying when a load of straw bales arrived and needed stacking. When they were done and the spraying almost finished some friends arrived so now time to feed the pigs and I'm knackered and need a shower and wait for a decent hour to knock back a few Old Speckled Hens. So hopefully tomorrow , but I have already started keying in the embryo of a program with loops doing the angular stepping :clap:

efrench:

--- Quote from: RussellT on June 15, 2019, 04:13:17 AM ---
--- Quote from: efrench on June 14, 2019, 04:05:49 PM ---You all are working too hard  :D Review my posted diagram.  By using one leg of the right triangle as a line perpendicular to the midpoint of the flat, there is only one right triangle to solve for. The cutter is always tangent to the flat.

--- End quote ---

I think your maths is right but incomplete.  In your diagram B varies with the angle to which the workpiece is rotated.  You need to use
 A * tan(angle) = B and then apply Pythagorus.

Russell

--- End quote ---

Or B varies by the step over amount and determines the rotation angle.  Which method you choose depends on  whether you want a consistent cusp height or a consistent rotation angle.

awemawson:
So I spent much of the day chasing a silly bug in my embryo program (it wouldn't loop and denied knowing the loop back destination - solved, too many zeros on a line number  :bang:)

But I don't think the maths is right. I set up some variables:

R10 = starting angle
R11 = angle span
R12 = angle step
R13 = stock diameter
R14 = End Mill diameter

Then having selected the correct tool the @714 command ensures tool changing is completed before I set it spinning I move to a safe distance from the  stock

Then I rotate the stock to the starting angle and calculate the term  X = (D+R)/ Cos (Angle) and move the cutter to that point at feed rate then move in rapid back to my safe height.

Then I calculate the next angle by adding the step, and if the angle span hasn't been exceeded, loop back and do it all over again.

For testing purposes I I have kept the cutter well clear of the stock and temporarily added a 500 millisecond delay when the cutter is at full depth so I stood a chance of reading its position on the screen. This has given me the following X values which obviously are not correct:

A=00, X=30.000
A=05, X=30.114
A=10, X=30.462
A=15, X=31.058
A=20, X=31.925
A=25, X=33.101
A=30, X=34.641
A=35, X=36.623
A=40, X=39.162
A=45, X=42.426
A=50, X=46.671
A=55, X=52.303
A=60, X=60.000

So no metal cut yet, but then no cutters broken either  :thumbup:

I suppose that it's possible that the cosine function work in radians rather than degrees, but I can find absolutely no reference to radians in the book of words, and all other values are expressed in degrees. :scratch:

If anyone can please critique the code - I attach a copy and also the relevant crib sheet - I'd be most grateful




Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version