Re: Just joined, hobby level
Welcome! Mine runs on homebrew software too!
Tom
Re: Just joined, hobby level
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://cnc-gcode-software.com/wp27
Gareth
1 Attachment(s)
Re: Just joined, hobby level
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:
Attachment 4989
It's a fair bit more difficult to work out the co-ordinates for that...
Re: Just joined, hobby level
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
1 Attachment(s)
Re: Just joined, hobby level
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:
Attachment 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.
Tom
Re: Just joined, hobby level
I should add that to read a vector equation primer or two will help.
http://www.gamedev.net/page/resource...a-primer-r1832
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.
Tom
Re: Just joined, hobby level
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.
Re: Just joined, hobby level
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.
Re: Just joined, hobby level