Thread: in calculating the tool path
Thanks routercnc, that is in essence what the solution posted by irving actually is, only the equations have been bashed about already to give the solution. The only difference being that instead of using:-
The equation for a circle (x^2 + y^2 = r^2)
then you use the parametric equation for a circle of :-
x = r SIN(theta)
y = r COS(theta)
Well, my contribution to this thread will be about as much use as tits on a kipper.
Reading it has seriously damaged my belief that I will ever master the maths involved in rudimentary CNC :sad:. I am beginning to think I should have listened to my old teacher instead of getting stuck into some practical human biology!!
Panic stricken in darkest Dorset!!Tim G-C
“I disapprove of what you say, but I will defend to the death your right to say it.”
(attrib. Voltaire but written by Evelyn Beatrice Hall "The Friends of Voltaire" 1906)
I suspected it was, but posted anyway. I wondered if the approach of simultaneous equations (for arbitrary shapes which can be defined by an equation, such as circle, rectangle, ellipse, lines, parabola etc.) might be useful in the future. Anyway, glad you're sorted. Thanks for posting - it was an interesting puzzle!
I'm impressed you do some of this by hand. When I got started on CNC I went straight to AutoCAD > dxf > toolpath generation > CNC so have never had to do much gcode creation, other then tweaking a few existing codes.
Wobblybootie - panic not! Assuming you can draw stuff in CAD, I suspect you can cut anything you want without getting bogged down in maths. I think there is a contingency of users who not only enjoy making stuff, but also enjoy the ownership and general challenge of CNC in general. I'm trying to resist falling into this latter category, and using it as a means to an end, but I must admit that it is drawing me in dammit. . . .
Thanks, I have now sorted out that bit, although that only generates the drawing on the screen rather then the G-code but I am working through that now.
You might want to see a first trial of my MF70 conversion, with just a pen tapped to the side of the miller.
My ultimate aim is for small PCBs but I am working on automatic levelling correction at the moment as the Y axis tilts by about 0.2mm ever 40mm. I prefer to correct it by making corrections to the Z axis coordinates as I am more comfortable with that.
To Wobblybootie, it's never too late to learn. My wife does home tutoring for kids and I was discussing some mathematical formula with my son (on a visit home). One child overheard and apparently was amassed that this maths stuff was actually really used at work. By the way I spent a year living in Dorset (Weymouth) back in the 70s.
Thanks again for the support.
If the Y axis is slightly out, and it is difficult to level, then you could always bolt a piece of wood to the table, and run the cutter over it until it was levelled. This would then mean the PCB was flat relative to the cutter.
Also, in my earlier post#9 there was an error in the quadratic equation, although the approach is still valid.
By the way, can we help generate the Gcode for you? It would be a matter of minutes to draw in CAD and create the Gcode automatically. Do you know what post processor you are using on the Mac, and what it might be similar to on the PC? e.g. Mach3 etc. What are the dimensions and tool size?
I have CAD.py and CAM.py but can't get all the dependent packages to install. Like most software of this ilk the writers are more interested in the next fun thing rather than making it install properly.
OK on the levelling system, yes I have seen this technique but it can't compensate for the waviness of the PCB itself. Where as an automatic calibrated system would.
Thought I'd explain the post processor bit, then thought I'd go the whole hog and show you one possible way to do it all in software (on a PC, sorry!)
The post processor is the bit which takes the gcode and tells the machine how to move. On a PC this might be Mach3 (Windows), EMC2 (Linux), for example.
But the complete chain, doing it is software, would look something like this (or this is how I would do it anyway):
1. CAD. Any cheap simple CAD program would do, but look for dxf output capability if possible.
2. Toolpath creation. I'm using Vectric Cut2D (£117) which is excellent. Other s/ware also available, including CAMBAM which has free 50 trials. This takes the dxf drawing, and you then tell it which outline to cut, inside, outside, or on the line, and the tool diameter, and it will work out all the gcode you need. This can be a simple drawing or a complex drawing, it will work them all out. You can also drill holes, or create pockets, or rebates, all very easy to do. You then select the post processor you will be using, in my case Mach3, and the appropriate Gcode is created in a text file. I've attached one for Mach3 which might by chance work for you too. Do an air cut first! Part is dia 60mm, 3mm thickness, just as a trial.
3. Open up your post processor, Mach3 for me, and it will cut out the part on your machine. Mach3 uses the parallel port, which in my case goes into a DIYCNC system 3 board, and then on to the steppers.
This whole process took me about 10minutes, but I was stopping to take screenshots etc., so it is pretty quick. Life's a bit short to do this by hand - how were you thinking of creating the PCB layout gcode? Would you consider jumping ship over to a PC - it certainly is well supported with quality software and hardware.
Hope this helps . . .
By Jonathan in forum Gantry/Router Machines & BuildingReplies: 11Last Post: 10-12-2015, 10:32 AM
By Nemo1966 in forum Computer HardwareReplies: 5Last Post: 07-10-2013, 03:25 PM
By antsals in forum General DiscussionReplies: 2Last Post: 11-07-2011, 11:18 AM
By swarf-boy in forum Machine DiscussionReplies: 2Last Post: 21-12-2010, 11:18 PM
By Jonathan in forum Rails, Guideways & BearingsReplies: 7Last Post: 24-11-2010, 01:26 AM