CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > OpenSource CNC Design Center > Coding


Coding Post your Coding for opensource projects here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #13   Ban this user!
Old 07-03-2007, 02:36 PM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 777
WayneHill is on a distinguished road

Originally Posted by teenrocketnerd View Post
Could someone post the "formula" for cutting circles or circular interpolations. Just What to put in, where it all goes, and what it means. I need to cut circles and arcs.

http://technology.calumet.purdue.edu.../lecture13.pdf
__________________
Wayne Hill
www.codemangler.com
Reply With Quote

  #14   Ban this user!
Old 07-09-2007, 11:14 PM
 
Join Date: Jul 2003
Location: New Zealand
Posts: 1,039
Kiwi is on a distinguished road

James
Did you get what you needed.
I'm working on a program which may be of some help.
Checkout what has been done and advise (errors, improvements, future additions) if you are interested.
Attached Files
File Type: zip G02 G03 CalculatorV1.1.zip‎ (11.5 KB, 222 views)

Last edited by Kiwi; 07-10-2007 at 06:31 AM. Reason: Replaced with updated program
Reply With Quote

  #15   Ban this user!
Old 08-03-2007, 04:09 PM
 
Join Date: Mar 2003
Location: Orange County, California
Posts: 317
jemmyell is on a distinguished road

Thank you!

I do have the routines under control now. My big problem was a basic misunderstanding of degrees versus radians.

-James
__________________
James Leonard - www.DragonCNC.com - www.LeonardCNCSoftware.com - www.CorelDRAWCadCam.com - www.LeonardMusicalInstruments.com
Reply With Quote

Sponsored Links
  #16   Ban this user!
Old 08-03-2007, 05:19 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,559
Geof will become famous soon enough

Originally Posted by teenrocketnerd View Post
Could someone post the "formula" for cutting circles or circular interpolations. Just What to put in, where it all goes, and what it means. I need to cut circles and arcs.
The circular interpolation commands are G02 for clockwise and G03 for counterclockwise tool travel. The commands below work on a Haas, there may be machine related differences.

G91 G03 R1. X0.5 Y0.5 Fffff is the incremental command which tells the machine to cut an arc with a radius of 1.0" from where it is to the point that is 0.5" away on both the X and Y axes. The arc path to be followed is the shortest route, i.e. the arc subtends less than 180 degrees

G91 G03 R-1. X0.5 Y0.5 Fffff is the same command but the arc path to be followed is the longest route, i.e. the arc subtends greater than 180 degrees.


G90 G03 R1. X0.5 Y0.5 Fffff is the absolute command which tells the machine to cut an arc with a radius of 1.0" from where it is to the point that is located at 0.5" on both the X and Y axes using the current Work Coordinate system. The arc path to be followed is the shortest route, i.e. the arc subtends less than 180 degrees.

G90 G03 R-1. X0.5 Y0.5 Fffff is the same command but the arc path to be followed is the longest route, i.e. the arc subtends greater than 180 degrees


G03 I0. J-0.5 tells the machine to do a full counterclockwise circle around a center that is zero distance away along the X axis and 0.5" away in the negative direction on the Y axis. It does not matter whether the command is G91 or G90 this command still generates a full circle.

It is possible to have Z motion during a circular interpolation and this depends on the choice of G91 or G90. The command G91 G02 I0. J-0.5 Z-.2 tells the machine to do a full clockwise circle about the center negative 0.5" along the Y axis and at the same time increment the Z axis down 0.2". A G90 would tell the machine to move to the position Z-.2 in the current Work Coordinate system.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #17   Ban this user!
Old 08-29-2007, 07:09 AM
 
Join Date: Mar 2006
Location: U.K.
Posts: 61
Stu_M3 is on a distinguished road

hope this info helps.

Stu
Attached Images
File Type: jpg circle calcs.jpg‎ (58.6 KB, 186 views)
Reply With Quote

  #18   Ban this user!
Old 08-01-2009, 04:16 PM
 
Join Date: Aug 2009
Location: United Kingdom
Posts: 1
Ar2uR is on a distinguished road
Wink Drawing Circles :)

Originally Posted by jemmyell View Post
Hi,

Can anybody help with an algorithm for generating circular interpolation for ARCs? I know the arc center (X,Y) the radius and the start angle and the end angle.

I want to output either a G02 or G03 gcode line.

TIA,

-James Leonard
'
OK I'm newbie here but i have simply solution for you.
Use simply raster algorithm it's eliminate all sin(x) cosin etc. living just simply adding etc. simply enough to use it on microcontroler..
To calculate it you need create something in way matrix of point each step give you 1 point on matrix. And use this Midpoint circle algorithm.

you can find it on this pages >
http://www.cs.unc.edu/~mcmillan/comp...e7/circle.html
http://en.wikipedia.org/wiki/Midpoint_circle_algorithm

To calculate G02 G03 code you need have in memory last position ( point X Y where you end after last G-command that will be a start point of your arc ) and then depend from what parameters you want get data of circle ( radius R , or I J ) you calculating closed circle and then from G02 (03) you need to take end ( pre-calculate end point ) to finding point on circle when you circle need to stop. Then you need to use jump algo to jump from start point to end and when you jumping from point to point you copping this like result of your calculation and then you can start driving motors.

I hope this hellp you a bit.
Reply With Quote

  #19   Ban this user!
Old 08-06-2009, 03:44 PM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 777
WayneHill is on a distinguished road

Ar2uR,

Interesting.
__________________
Wayne Hill
www.codemangler.com
Reply With Quote

  #20   Ban this user!
Old 08-06-2009, 05:58 PM
 
Join Date: Mar 2003
Location: Orange County, California
Posts: 317
jemmyell is on a distinguished road
just a note

Just a note.

This issue was settled for me and successfuly implemented quite a while ago. The problem I was having was trying to work in degrees when all the published algorithms / code I had been looking at needed radians...

-James
__________________
James Leonard - www.DragonCNC.com - www.LeonardCNCSoftware.com - www.CorelDRAWCadCam.com - www.LeonardMusicalInstruments.com
Reply With Quote

Sponsored Links
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Algorithm? CNCgr OpenSource Software 16 12-07-2009 05:23 PM
XY positioning algorithm needed Tracid PIC Programing / Design 4 11-28-2006 10:26 AM
Need Help With Circular Pocketing Algorithm lerman G-Code Programing 9 11-20-2006 04:41 PM
Blending algorithm of EMC2 Hebert LinuxCNC (formerly EMC2) 1 10-21-2006 10:22 AM
Adaptive clearing algorithm video davidmb DIY-CNC Router Table Machines 3 05-02-2006 01:13 PM




All times are GMT -5. The time now is 06:22 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361