Thread: Just joined, hobby level

26112011 #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.
Gareth

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

02122011 #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
http://cncgcodesoftware.com/wp27
GarethLast edited by cncgcg; 02122011 at 07:30 PM.

02122011 #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 5axis) 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:
It's a fair bit more difficult to work out the coordinates for that...

02122011 #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...
Regards
Gareth

02122011 #6
Hi
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:
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) = (xi,yj,zk). 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.
TomLast edited by black5f; 02122011 at 10:16 PM. Reason: maths wrong!
Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

02122011 #7
I should add that to read a vector equation primer or two will help.
http://www.gamedev.net/page/resource...aprimerr1832
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.
TomSherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

03122011 #8
Hi
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 ...
http://homepage.ntlworld.com/tombayes/public/Book1.xls
Change the numbers in red.Last edited by black5f; 03122011 at 01:03 AM.
Sherline lathe, Chester DB11V lathe, Myford/ Rodney mill, CNC mill Isel/ home made, Sealy Hack Saw, Meddings Pillar drill.

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

03122011 #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.
Similar Threads

help needed going to the next level
By luke11cnc in forum Computer SoftwareReplies: 8Last Post: 20092012, 08:53 AM 
NEW MEMBER: Just joined up
By PRB in forum New Member IntroductionsReplies: 1Last Post: 18032012, 09:46 PM 
RFQ: Parts for my hobby from your hobby
By Phobia1 in forum Projects, Jobs & RequestsReplies: 1Last Post: 18012011, 02:57 PM 
Level Y Axis
By sfallan in forum Machine DiscussionReplies: 3Last Post: 26092010, 12:52 PM 
NEW MEMBER: Hello i have just joined up
By ieezitin in forum New Member IntroductionsReplies: 3Last Post: 06032010, 11:30 PM
Bookmarks