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! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-11-2008, 02:24 AM
 
Join Date: May 2005
Location: canada
Posts: 1,149
cyclestart is on a distinguished road
just another python gcode thing

Here's a counterbore companion to Dan Falcks boltcircle.py. The toolpath is simple and not extremely efficient. However it appears to be reliable. The user is left to make some decisions and a small bit of math. The idea was to leave the program as flexible as possible for a wide range of mills. It can also place counterbores at any coordinate in a one-at-a-time-copy-and-paste kind of way.

The included help files make some mention of a commented gcode file. This isn't implemented so far.

John T has put up a more elaborate counterbore program on the wiki. It does some pretty cool tricks. That same wiki page has a surprising gedit/emc trick. Can't wait to try it out.
http://wiki.linuxcnc.org/cgi-bin/emc...ode_Generators
Attached Files
File Type: zip pybc_cbore.zip‎ (5.8 KB, 148 views)
__________________
Anyone who says "It only goes together one way" has no imagination.
Reply With Quote

  #2   Ban this user!
Old 02-15-2008, 08:08 PM
 
Join Date: Sep 2004
Location: USA
Posts: 147
Dan Falck is on a distinguished road

I will try out your code this weekend. I'm glad that you have found python to be fun to program in. If you're interested in the gedit plugins, I plan on adding a bit more to the wiki, showing how to do a python gui that talks to the editor.
Keep on hacking!

Dan
Reply With Quote

  #3   Ban this user!
Old 02-15-2008, 08:51 PM
 
Join Date: Apr 2003
Location: US
Posts: 307
cbcnc is on a distinguished road

I'm going to try to learn Python.
I haven't really done much programming since, well, Basic and Turbo Pascal.
I've got Python 2.5 and a book that I am working thru.
I want to try to extract those Hershey fonts they were talking about.
Be able to display a table to choose from and then output a scalable Gcode.
Does that sound doable for a newb or should I work up to it?

Chris
Reply With Quote

  #4   Ban this user!
Old 02-16-2008, 07:45 AM
 
Join Date: May 2005
Location: canada
Posts: 1,149
cyclestart is on a distinguished road

Originally Posted by cbcnc View Post
I've got Python 2.5 and a book that I am working thru.........

Does that sound doable for a newb or should I work up to it?
Hopefully that question was addressed to Dan I'm also a newb.

The program above was a learning exercise and part of the motivation for posting it was to get feedback on the content and style. The code is mostly "borrowed". Books and tutorials put me to sleep.

btw a rewrite is underway. The next version will be much cleaner and will do much more.
__________________
Anyone who says "It only goes together one way" has no imagination.
Reply With Quote

  #5   Ban this user!
Old 02-16-2008, 08:19 AM
 
Join Date: Apr 2003
Location: US
Posts: 307
cbcnc is on a distinguished road

There is something to going through and programming things yourself as a learning excercise.
I had the thought though that there's obviously code to take numbers and turn them into gcode.
Are there any independant modules or scripts or are they all just in the individual scripts?

Chris
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-16-2008, 11:24 AM
 
Join Date: Sep 2004
Location: USA
Posts: 147
Dan Falck is on a distinguished road

I have found that studying other people's code helps me the most. That makes it easy to see what does and doesn't work. You could look at a working program and change it slightly to see what happens. Keep a reference book or web site handy to check the things that you don't understand.
As far as converting the fonts, I don't know what it would involve, but if you really have an interest in that project- yes go for it. But, look for some other conversion programs first, to see how others have done it.
important things to learn for CAM and python- string formatting and file input and output. It seems to me that the math routines in python are really intuitive, so you will pick up on that pretty easily.
Work on the gui routines after you understand strings and file io.

Dan
P.S. I am no expert in python. I just really like it a lot and find it easy to understand (now).
Reply With Quote

  #7   Ban this user!
Old 02-16-2008, 11:40 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

Originally Posted by cbcnc View Post
There is something to going through and programming things yourself as a learning excercise.
I had the thought though that there's obviously code to take numbers and turn them into gcode.
Are there any independant modules or scripts or are they all just in the individual scripts?

Chris
Do a google on "ttt truetype tracer" and you will find what you seek... It is in C by could be done in python... heck I might even do it...

John
Reply With Quote

  #8   Ban this user!
Old 02-16-2008, 12:33 PM
 
Join Date: Apr 2003
Location: US
Posts: 307
cbcnc is on a distinguished road

Dan- I will look into some other code as I would like to learn. Yes, string formatting, manipulation and file IO are things that would be important with the Hershey fonts. They are written in a arcane text code format and would need to be translated. Then to a gcode file.
The reason I'm interested in those fonts is that they are a classic style in a single stroke font. Point to point format. And Free to use.

John- I have seen the True Type Tracer utility.
I know, I don't want to reinvent the wheel here. But I want to learn and that might mean trodding ground that has been gone over already.
If you don't mind, I will look at your code that you have on the wiki.

Chris
Reply With Quote

  #9   Ban this user!
Old 02-18-2008, 08:54 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

Chris,

That's what I put the code up there for. I found a lot of snippets and learned from them faster than from a book. So I posted what I learned on wiki...

Enjoy
John
Reply With Quote

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
simple python g-code generators Dan Falck OpenSource Software 0 11-26-2007 04:37 PM
what is this thing for? bigal General Electronics Discussion 35 07-08-2005 07:05 AM
I have a problem with my gcode or my conversion to gcode , everything is tiny? NickLatech G-Code Programing 0 03-10-2005 12:46 PM
What is this thing? And what 'exactly' does it do? DAB_Design Benchtop Machines 7 09-17-2004 03:42 PM
gcode to gcode converter july_favre General CAM Discussion 4 05-24-2004 06:51 PM




All times are GMT -5. The time now is 02:59 PM.





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