Page 1 of 2 12 LastLast
  1. Hi
    My name is Gareth, I'm from the UK but have lived and worked for over 30 years in Germany, having arrived here with the British Army and never going back ( I joined the army to escape where I was, so going back wasn't an option).
    I use a hobby level CNC machine, self built from a kit and write software to make it cut simple shapes.


  2. #2
    Welcome! Mine runs on homebrew software too!
    Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

  3. Hi Tom,
    Thanks for the reply,
    Have you ever tried a bowl shape?. I have been thinking about the trig for this for a while now. I remember seeing a G code routine doing something similar and it used Tan, but the way I visualise it you only need to mill repeated circle pockets moving inward with Z increasing down as it moves inward, which is also calculated with Cos or Sin and not Tan. Doing it this way makes it easier for me to also generate a scaled curve rather than a pure circular one i.e much deeper or shallower as required. If you look at my program you will see what I mean about scaling the arc.
    By scaling I mean ellipse, it's just my word for it since the program produces elliptical arcs depending on the X,Y scaling. Can you follow me?
    Here is the program, take a look at Arc, click the Arc button, drag the mouse in the drawing area to make the shape appear and scale X,Y to say 100, 45 and a sweep angle of 180 degrees. yes it's mm's, I got metrified years ago sorry

    Last edited by cncgcg; 02-12-2011 at 06:30 PM.

  4. #4
    At first it looks like just simple sin/cos ... but if I may there's one thing I think you might be missing out? When using a ballnose cutter, unless the cutter is kept perpendicular to the finish part's surface (impossible on a bowl without 5-axis) the cutter will cut more material off than intended. That's because the cutter is not a point, it has a finite diameter and the outer edge will cut more from the surface. It gets worse as the surface is steeper. This diagram will hopefully make it obvious:

    Click image for larger version. 

Name:	BallnoseCuttercompensation.png 
Views:	92 
Size:	17.3 KB 
ID:	4989

    It's a fair bit more difficult to work out the co-ordinates for that...

  5. Hi Jonathan,
    Thanks for the reply,
    Very illuminating about it having to be kept perpendicular to the surface (impossible without 5 axis, as you said). I'm hobby level as I said, but it would have been fun trying to write it.
    I think my idea, having looked at what you wrote, would result in a stepping effect, is that right?.
    Is Tan necessary to roughly accomplish what I'd hoped for or can this all be done using Sin Cos alone?. I'm not into Tan...

  6. #6

    A bowl. Ok, whats your maths like? Sorry as this might seem a little blunt! But, it's the way to do it. I did a quick picture like Jonathan to explain the problem with set steps in z:

    Click image for larger version. 

Name:	Image1.jpg 
Views:	97 
Size:	199.8 KB 
ID:	4991

    Suffice to say, from above they won't be evenly spaced circles either. You need to use vector geometry. A bowl is quite a simple surface, but this applies to all surfaces (ignoring the tool hitting other things!). You know the point on the surface you need to goto, x,y,z. You need to calculate the tangent to this surface, in 2D its a line, in 3D its a planar surface. Differentiate the equation (easier than it sounds) of the surface to get the equation of the tangent, because it's a bowl there are simpler equations that give the tangent at a point, again, a line in 2D, a plane in 3D. You need to calculate the normal vector to the tangent at the point the tangent and surface intersect, ie x,y,z. This is a line perpendicular to the tangent, normally, you would normalise it, ie, make the length = 1. To define it, in plain terms, you need to goto the point you want to cut to, them move away in the direction of the normal. The normal should point to the outside! This is represented by an equation. The actual tool offset is along this vector for a distance of the raduis of the tool (this is the centre of the tool, other trig will give the tool tip). You should end up with a vector equation, (x",y",z") = (x,y,z) + a(x',y',y') where, the modulus (length (pythagoras)) of (ax',by',cy') (multipied out now) is the tool radius and (x',y',y') is normal the vector from (x,y,z). 2D is a little simpler but you still need to work out the tangent to the semi circle at the point you want to cut.
    Yes I know how to do this, and thats sad!
    The good news is that it's a bowl, so the normal vector is actually the line from the point you want to cut to the bowl 3D centre. So....
    If the centre of the bowl is (i,j,k), then the normal vector is always (x,y,z) - (i,j,k), lets call that (q,r,p) = (x-i,y-j,z-k). normalise .. t=sqrt(q2+r2+p2) so
    normal vector is now (q,r,p) = (q/t,r/t,p/t). This is the normal from (x,y,z) though! Say the raduis of the tool is 3mm. If I want the tool edge to be at (x,y,z), the tool centre (of radius) must be at (x",y",z") = (x,y,z)+ 3(q,r,p). ie ((x+3q),(y ... etc This assumes the vector points inwards!
    So for a hemispherical bowl only ... work out the series of points that form each circle at even z depths (spreadsheet will do this), probaly easier to work out the radius of the circle first. Know where your bowl is in 3D space! Use the vector equation to calculate the tool position (add it to the point on teh circle, if programming the tip just add (0,0,-3) to the answer.
    Generally speaking you will get a good fininsh if z steps (and x,y moves on the circle are about 10% of tool diameter). Not trying to be clever or show off or anything, this is the way to do it, 25 years ago I wrote some surface modelling software for making lasts (shoemaking), csplines, bicubic patches etc etc.
    Last edited by black5f; 02-12-2011 at 09:16 PM. Reason: maths wrong!
    Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

  7. #7
    I should add that to read a vector equation primer or two will help.

    You'll be programming vector transformations using matrices in no time at all!

    But.... strictly work to rule No 1!

    Rule 1. Have fun!
    Rule 2. See rule 1.

    Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

  8. #8

    A bit bored tonight. Looked at your site, Good stuff mate! Had a few whiskys so may be errors! If you need to do other regular shapes just replace the circle equation with your own but it assumes a hemisphere and cheats by using the centre to tool contact as the normal, for elipses etc may be different but for regular shapes you can use the focus. Anything planar is easy. If you let me know the equation of the surface I will tell you the eq of the normal. These are just the finish cuts of course, you will have to cut the other material out with concentric circles keeping z constant. Other surfaces are the same, just need to know the normal vector. Actually you could incorporate a tool deflection number as well relatively easily. This is all to the centre of radius of the tool, just adjust the z path by the radius if you need to work to the tooltip.

    Something to play with ...

    Change the numbers in red.
    Last edited by black5f; 03-12-2011 at 12:03 AM.
    Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

  9. #9
    You beat me to it, nice explanation! I used the same method with vectors in my wind turbine blade profile and tool-path calculation program. Using the equation for a NACCA airfoil, which doesn't simplify as nicely.
    Last edited by Jonathan; 03-12-2011 at 12:26 AM.

  10. #10
    BTW tan is just sin/cos.
    Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

Page 1 of 2 12 LastLast

Similar Threads

  1. help needed going to the next level
    By luke11cnc in forum Computer Software
    Replies: 8
    Last Post: 20-09-2012, 07:53 AM
  2. NEW MEMBER: Just joined up
    By PRB in forum New Member Introductions
    Replies: 1
    Last Post: 18-03-2012, 08:46 PM
  3. RFQ: Parts for my hobby from your hobby
    By Phobia1 in forum Projects, Jobs & Requests
    Replies: 1
    Last Post: 18-01-2011, 01:57 PM
  4. Level Y Axis
    By sfallan in forum Machine Discussion
    Replies: 3
    Last Post: 26-09-2010, 11:52 AM
  5. NEW MEMBER: Hello i have just joined up
    By ieezitin in forum New Member Introductions
    Replies: 3
    Last Post: 06-03-2010, 10:30 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts