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 11-13-2009, 05:11 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road
Using EMC2 with a Mac (GCodeCnv)

I love emc2 but I hate having to go out in the garage when working on a part just to see if emc2 likes my gcode or not.

So to make a long story short, I am working on a piece of software to run on my Mac that will read a DXF file and generate gcode for the machines in the shop.

I actually have a version running. It currently generates gcode specifically for EMC2 (it uses o-words and emc2 subroutines). It currently only generates code for my mill (not my lathe). I have written a number of gcode subroutines and many of them will ultimately be used in wizards in the software. The only one that is currently being used as a wizard is for cutting holes. I generate a subroutine from the DXF input and have another subroutine that calls it repeatedly to cut to depth. The result is much shorter gcode output than some other software. Much easier to debug.

It has a job setup window for setting parameters related to the particular job being run; a layer list for all of the layers in the DXf, and a Layer Edit that allows you to set certain variables by layer (for example you can change the depth of cut for each layer).

You can also set a preference to set how close the ends of entities must be to be considered connected.

I have attached a few screen shots to show what it looks like.

It currently barfs on some large DXF files.

Alan
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2009-11-12 at 3.14.47 PM.jpg‎
Views:	263
Size:	71.1 KB
ID:	93303   Click image for larger version

Name:	Screen shot 2009-11-12 at 3.17.16 PM.jpg‎
Views:	202
Size:	87.9 KB
ID:	93304   Click image for larger version

Name:	Screen shot 2009-11-12 at 3.19.43 PM.jpg‎
Views:	206
Size:	86.2 KB
ID:	93305  
__________________
http://www.alansmachineworks.com
Reply With Quote

  #2   Ban this user!
Old 11-13-2009, 05:43 PM
 
Join Date: Jun 2005
Location: norway
Posts: 53
henrikw is on a distinguished road

Nice Work!

Need a beta tester?

H.
Reply With Quote

  #3   Ban this user!
Old 11-13-2009, 08:42 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by henrikw View Post
Nice Work!

Need a beta tester?

H.
Probably will shortly.

Alan
__________________
http://www.alansmachineworks.com
Reply With Quote

  #4   Ban this user!
Old 11-14-2009, 09:47 AM
 
Join Date: Jan 2006
Location: Thailand
Posts: 51
chinsettawong is on a distinguished road

Wonderful work!

Wachara C.
Reply With Quote

  #5   Ban this user!
Old 12-06-2009, 11:34 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

I haven't totally solved the problem of dealing with large files but I did discover that it is something about their format that my program doesn't like. If I open the problem file with QCad (which it does without complaining) and resave the file then I can process it. Since QCad can open the problem file and I can't it must be in my read routines.

Alan
__________________
http://www.alansmachineworks.com
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-07-2009, 08:22 AM
 
Join Date: Sep 2004
Location: USA
Posts: 147
Dan Falck is on a distinguished road

Alan,
Could it be as simple as different line endings? I've had to put '\r\n' in for my line endings for the mac and '\n' for unix. It's usually easy to see what's going on by opening the file with vi.

Dan
Reply With Quote

  #7   Ban this user!
Old 12-10-2009, 07:41 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by Dan Falck View Post
Alan,
Could it be as simple as different line endings? I've had to put '\r\n' in for my line endings for the mac and '\n' for unix. It's usually easy to see what's going on by opening the file with vi.

Dan
No, it is something else because I fixed the line endings problem a while back.

I have been spending a bunch of time on cleaning up my code and testing. Hopefully, I didn't break too much while cleaning up. I just had a lot of little bugs that I wanted to fix before I let anyone else have a shot at it.

Alan
__________________
http://www.alansmachineworks.com
Reply With Quote

  #8   Ban this user!
Old 12-12-2009, 01:50 AM
SpeedsCustom's Avatar  
Join Date: Sep 2006
Location: US
Posts: 1,462
SpeedsCustom is on a distinguished road

Good stuff ACondit, you always helped me with EMC2, i'll be asking questions in the coming days. Need to re-set my coolant relays gain, can't them to work!


-Jason
Reply With Quote

  #9   Ban this user!
Old 12-13-2009, 03:04 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by acondit View Post
No, it is something else because I fixed the line endings problem a while back.

I have been spending a bunch of time on cleaning up my code and testing. Hopefully, I didn't break too much while cleaning up. I just had a lot of little bugs that I wanted to fix before I let anyone else have a shot at it.

Alan
Well, I thought that I fixed the line endings problem. It turns out that I had just fixed it for files written on the Mac or Linux/Unix. It was still bombing on files written under windows 'crlf' endings. That is now fixed too.

I still have a problem with certain entities in one DXF file. I handle LWPOLYLINE but not POLYLINE (Autocad DXF entity names). So the one DXF that I can't handle uses Polylines. I haven't decided what I want to do with that yet, it uses some slightly weird encoding and seems to have a lot of different types in it. Most of the DXF's are less that 200k but that one is 1.5mb. It looks almost like it has broken the curves into very short line segments rather than curves. That makes processing the file much slower in EMC2 as well. At some point I will have to bite the bullet and support that too, but for now I want to get everything else that I have written tested. In terms of machining speed it is better to use arcs to generate the DXF image than breaking the arc into very short line segments.

Anyway size isn't a problem. I added some progress indicators so I can tell where I am in processing a file.

Alan
__________________
http://www.alansmachineworks.com
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
Need Help!- EMC2 Jamy LinuxCNC (formerly EMC2) 32 08-17-2009 11:03 PM
Newbie- 3D DXF EMC2 or 2D only? klaymonster LinuxCNC (formerly EMC2) 7 01-14-2009 04:22 PM
EMC2 Jamy General CAD Discussion 2 12-11-2008 12:02 AM
EMC2 HELP HELP HELP Alwyn OpenSource Software 2 10-11-2008 11:18 AM
Emc2 sdantonio Mach Mill 2 02-05-2007 02:26 PM




All times are GMT -5. The time now is 05:13 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