![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Have one to share? I'm working on a code generator (in python) and finding it difficult to get a smooth loop in from center. A short example using a 1/2" EM with a target bore of 0.9" and a 0.1" stepover. From cam program Code: % G00 X0.0125 Y0 Z.1 G01 Z-.1 F20 G03 X-.0625 R.0375 X.1125 R.0875 X-.1625 R.1375 x.1094 Y-.1674 R.1875 X.2 Y0 R.2 X-.2 R.2 X.1094 Y-.1674 R.2 G00 z2 % Code: % G00 X 0.0000 Y 0.0000 Z.1 G01 Z -0.1000 F3 G01 X 0.0250 F50 G03 X 0.0000 Y 0.0250 R 0.0250 X -0.0500 Y 0.0000 R 0.0312 X 0.0000 Y -0.0750 R 0.0563 X 0.1000 Y 0.0000 R 0.0813 X 0.0000 Y 0.1250 R 0.1063 X -0.1500 Y 0.0000 R 0.1313 X 0.0000 Y -0.1750 R 0.1562 X 0.2000 Y 0.0000 R 0.1813 X 0.0000 Y 0.2000 R 0.2000 X -0.2000 Y 0.0000 R 0.2000 X 0.0000 Y -0.2000 R 0.2000 X 0.2000 Y 0.0000 R 0.2000 X 0.0000 Y 0.2000 R 0.2000 G00 Z2 %
__________________ Anyone who says "It only goes together one way" has no imagination. |
|
#2
| |||
| |||
| In order to avoid 'jogs' when you change arcs, you need to make sure that the new radius is initially parallel to the old one. When you 'average' your radius, the machine moves the center of rotation to a place that you're not accounting for. I'm new to the CNC thing, but I'm trying to figure out how you get 0.9" bore with a 0.2" radius. spiral. Also, I'm assuming you don't really care about the feed rate. Let's assume, for a moment, that you're trying approximate a logarithmic spiral with final radius $R (at tool center) centered at 0,0 that goes out some $d per revolution. Here's some pseudocode for spiraling outward: Code: for(n=0; n*d<(R-d); n++) {
x[0] y[d*n+d/4] R[d*n+/4]
x[n*d+2/4] y[-d/4] R[d*n+2d/4]
x[-d/4] y[d*n-3/4] R[d*n+3/4]
x[-d*n-5*d/4] y[0] R[d*n+4*d/4]
} Last edited by NateTG; 03-19-2008 at 01:57 PM. Reason: Apparently the forum software eats dollarsigns. |
|
#3
| |||
| |||
__________________ It's just a part..... cutter still goes round and round.... |
|
#4
| |||
| |||
| Thanks for the reply. Will test that out that math if my brain can decipher it. Formal education was many years ago LOL. btw: EM is shop shorthand for endmill. Probably what threw you off.
__________________ Anyone who says "It only goes together one way" has no imagination. |
|
#5
| |||
| |||
|
Imagine you've got a square peg where one of the corners is on the center of the circle, and you're unwinding a string from the square peg. Every time that you unwind around a corner, your radius is going to change, but the two centers of rotation are going to be in line with each other (along the string). |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie- Drawing a spiral? | m1911bldr | BobCad-Cam | 1 | 02-05-2008 12:51 PM |
| Convert Fanuc Macro to Fadal Macro | bfoster59 | Fadal | 1 | 11-08-2007 11:41 PM |
| Spiral saw RPM | nophead00 | General Metalwork Discussion | 2 | 04-22-2007 03:43 AM |
| 2D contouring with spiral | Alan L | Hypermill | 0 | 12-30-2006 07:53 PM |
| The magical spiral | paul3112 | G-Code Programing | 3 | 08-06-2006 09:46 AM |