# Thread: Cutting a non-circular arc ?

1. ## Cutting a non-circular arc ?

If I want to cut a parabolic path, or any non-circular arc, do I need to be able to programme ?
The alternative to writing hundreds of lines of code for small incremental moves would be to either write my own program, , or to be able to tell the machine to run some sort of iterative code that stops after a given number of cycles, then moves on the the next instruction.
Any help, please ?
John

2. Well, there's no canned cycle that will cut a parabolic arc, but if you can define the arc mathematically, I don't see why you couldn't get EMC to move from point to point along the arc.

Running for a set number of cycles and them moving on, or cutting each cycle with a slightly different path (such as stepping down, or over, or along a radius) is the REASON I switched from Mach3 to EMC. I use conditional loops and program variables constantly at work, and just HAD to have them at home, too.

http://www.linuxcnc.org/docview/html/gcode_main.html

3. The end result is always a series of short, straight moves. The easiest way to get there is to find a CAD program that'll let you do what you want, and export a .dxf of line segments and convert that to g-code.

Another easy way is to use Excel to output the G-code.

4. Programming the part's surface path isn't so hard... figuring out how to compensate for the shape of your cutter can be fun though
I.E. calculate the path of a vertical circular arc...
x^2+Z^2=R^2
Z=(R^2-X^2)^.5

If your cutter is a sphere, it would come out fine if you just subtract its radius from the final radius, but if your cutter is a cylinder, flat end, like an end mill.... then you need some Trig. to find your cutter compensation... same for a parabola and a round cutter.

5. Hi John, I had a small program a couple of years ago that created code for mirrors, lenses and I think it would do parabola's as well, I cannot think of its name but if I can dig it up I will let you know.

Cheers.

Russell.

6. If an ellipse is oriented in one of the axes, it would be a one axis scaling thing, which I don't know if EMC has.

7. Morning all, and hi Russell.
Welcome to another room in Greybeard's Home for the Bewildered.

My request for this bit of info comes from my other thread on working out a centre line Roman letter plot.
To generate a decent looking serif, the 60 degree v-cutter needs to follow a short parabolic helix, and given the emc doesn't have a gcode for that, it's going to be a series of short cuts, ramping down to the final depth of the main stroke of the letter.

I have no problem with producing the function of the curve, but only have a vague idea on how to write the gcode such that the interpreter will calculate a series of steps for me.
For example, if I needed to cut a sine curve -
X [#1], y[ sin^-1#1] (where #1 goes from 0 to 1 in steps of 0.05 )(Not sure if ^ is the correct symbol for "to the power of")
Then when #1 reaches 1, the plot moves on to the next line of code.
I have some idea that this uses an IF -, THEN -, structure, but I don't know how to set it out.
Regards
John

8. Hmmm... V-Carve would do this pretty easily

Russell.

9. If I had a dog, I wouldn't have to bark
John

10. Originally Posted by greybeard
Morning all, and hi Russell.
Welcome to another room in Greybeard's Home for the Bewildered.

My request for this bit of info comes from my other thread on working out a centre line Roman letter plot.
To generate a decent looking serif, the 60 degree v-cutter needs to follow a short parabolic helix, and given the emc doesn't have a gcode for that, it's going to be a series of short cuts, ramping down to the final depth of the main stroke of the letter.

I have no problem with producing the function of the curve, but only have a vague idea on how to write the gcode such that the interpreter will calculate a series of steps for me.
For example, if I needed to cut a sine curve -
X [#1], y[ sin^-1#1] (where #1 goes from 0 to 1 in steps of 0.05 )(Not sure if ^ is the correct symbol for "to the power of")
Then when #1 reaches 1, the plot moves on to the next line of code.
I have some idea that this uses an IF -, THEN -, structure, but I don't know how to set it out.
Regards
John
Something like:

O100 While [#1 LE 1]
G1 X [#1], Y[ SIN^-1#1]
#1=[#1+.05]
O100 ENDWHILE

...but the [sin^-1] doesn't work.

11. Originally Posted by vlmarshall
Something like:

O100 While [#1 LE 1]
G1 X [#1], Y[ SIN^-1#1]
#1=[#1+.05]
O100 ENDWHILE

...but the [sin^-1] doesn't work.
Thanks for your help vlmarshal.
My [sin^-1 *#1] was a complete guess as to how to express
"that number which was the sine of n degrees, where n went from 0 degrees to 90 degrees in 20 steps".
I think it should have read Y[SIN[**-1]#1], but I see it wouldn't have worked anyway.

I'll see what I can learn about the WHILE/ENDWHILE command, but I may come back for more help.

Regards
John

12. Is there a list of O-codes showing specific meaning associated with particular numbers, or does the operator define their own meaning ?

Page 1 of 3 123 Last