587,043 active members*
3,203 visitors online*
Register for free
Login
IndustryArena Forum > Other Machines > PCB milling > Optimizer for PCB-Gcode Windows GUI
Results 1 to 18 of 18
  1. #1
    Join Date
    Dec 2004
    Posts
    1137

    Optimizer for PCB-Gcode Windows GUI

    Well, after a day and a half of heads down and a lot of head scratching (C++ and Qt are some very different animals to what I am used to) I am proud to announce Opti_Qt.
    [attachment=0]opti_qt.jpg[/attachment]
    Not wanting to make it too complex, I opted for a drag and drop interface.
    1. Open the Optimizer (double-click opti_qt.exe) note: the two Qt dlls need to be in the same directory or in your path
    2. Open an explorer window to your source .nc file directory
    3. Ctrl-click (or shift-click) to highlight 1 or more files
    4. Click, drag, and drop onto the Optimizer upper pane
    5. The files are processed one after the other. The output files are put in the same directory as the input. The output append _OPT tot he filename.
    6. Repeat for additional files and directories

    Enjoy, and do report issues and kudos

    The application file is large due to the embedded DLLs (3.3MB) but it can't be helped.

    Click here to see all of the files available for download.

    *** If you downloaded (8 of you ) the executable prior to 7/27/2008 your need the MingW10.dll but I recommend getting the all in one file now.

    PS: PCB-Gcode is located here: http://www.pcbgcode.org
    Attached Thumbnails Attached Thumbnails opti_qt.jpg  

  2. #2
    Join Date
    Dec 2004
    Posts
    1137
    Guys, I totally neglected to give the original coder (or myself for that matter) proper recognition (any at all) in the windows source code. The only information I have on him at this moment is that his first name is Daniel, he is an Aussie, and he goes by the nick of dakiller. Without his core code, this project would not be where it is today. Thanks Daniel. All future sources will contain this statement or some reflection of it.

    Jay

  3. #3
    Join Date
    Dec 2004
    Posts
    1137
    Update: (I know I just can't stop working on this thing) ... there is now a single file (about 3.3MB versus the 5MB beforehand) that no longer requires the DLLs. Ok, now I want some feedback from you guys

    Go here for all of the files.

    Jay

  4. #4
    Join Date
    Dec 2004
    Posts
    84
    JayC,

    I can't say I'm doing anything complicated in terms of pcb's but it does work and is very easy to use. Good job!

    Best regards,
    Mike

  5. #5
    Join Date
    Dec 2004
    Posts
    1137
    Thanks Mike.

    Just a word of aution for you and others. It doesn't work for the drill layers (td and bd) Ill need to add additional code to keep all of the drill sections intact ... it may not even be worth it.

  6. #6
    Join Date
    Dec 2004
    Posts
    1137
    Added code to allow for input files with no spacing between G code and coordinate pair.

    Not sure how I want to approach the drill files yet so that is not included in this release.

    Jay

  7. #7
    Join Date
    Jan 2006
    Posts
    38
    Very good job Jay

  8. #8
    Join Date
    Dec 2004
    Posts
    1137
    Thank you.

  9. #9
    Join Date
    Dec 2004
    Posts
    1137
    Update: Some users were experiencing "strange" behavior with the output file format in some programs. The issue was tracked to missing carriage returns. I have fixed this in release 1.1 and uploaded the code to the repository link above. This issue only affected the GUI version.

    Jay

  10. #10
    Join Date
    Apr 2007
    Posts
    60
    Jay
    Thanks for the work on this. Works nicely and now works with NCPLOT . One thing I notice however is that it does not seem to optimize a drill file. Should it work for drill files ?

    Thanks

  11. #11
    Join Date
    Dec 2004
    Posts
    1137
    Quote Originally Posted by ringram2077 View Post
    Jay
    Thanks for the work on this. Works nicely and now works with NCPLOT . One thing I notice however is that it does not seem to optimize a drill file. Should it work for drill files ?

    Thanks
    See post #5 above. It doesn't work on the drill files. I have not had time to add this. The reason is that the drills are grouped by size and the current code will optimize the drilling, but no accommodate tool changes ... not good.

    Jay

  12. #12
    Join Date
    Apr 2007
    Posts
    60
    Ahh yes.....I overlooked that post, sorry. Actually on the boards I make I only use one size drill. I wish I knew how to prevent to tool changes altogether. If no tool changes are called for in the drill file would it then optimize the file ?

  13. #13
    Join Date
    Sep 2006
    Posts
    218

    Lightbulb why not in ulp?

    Why did you not implement this algorithm in a ulp, that can be run from Eagle?
    graphical interface exist, high-level functions exist, language is almost C
    ?

  14. #14
    Join Date
    Dec 2004
    Posts
    1137
    Quote Originally Posted by eSilviu View Post
    Why did you not implement this algorithm in a ulp, that can be run from Eagle?
    graphical interface exist, high-level functions exist, language is almost C
    ?
    Be my guest All of the source is available. Of course for those that use another editor than eagle, your version would not work for them. But it would be nice to add the optimization tot he current ULP. I looked into it, but didn't see how. Teach me since it sounds like you know how to do it.

    Jay

  15. #15
    Join Date
    Dec 2004
    Posts
    1137
    Quote Originally Posted by ringram2077 View Post
    Ahh yes.....I overlooked that post, sorry. Actually on the boards I make I only use one size drill. I wish I knew how to prevent to tool changes altogether. If no tool changes are called for in the drill file would it then optimize the file ?
    If you use Mach3 you can tell it to ignore tool changes in the General Options. Theoretically, yes it would ... but do air test it first

    Jay

  16. #16
    Join Date
    Sep 2006
    Posts
    218
    Quote Originally Posted by Jay C View Post
    Be my guest All of the source is available. Of course for those that use another editor than eagle, your version would not work for them. But it would be nice to add the optimization tot he current ULP. I looked into it, but didn't see how. Teach me since it sounds like you know how to do it.

    Jay
    you could start from ftp://ftp.cadsoft.de/eagle/userfiles/ulp/gcode-1.zip

    there are maximum 3 steps for processing a pcb: mill, drill and cut board.
    after each step, you have an external file that contain the generated gcode, and you could apply the optimisation code to this file.
    problem is that you must adapt your code to work onl with arrays and other simple operations.

  17. #17
    Join Date
    Dec 2004
    Posts
    1137
    Just so you know, the code uses the output from the PCB-Gcode ulp. It simply rearranges the lines and paths so that when they are cut it reduces the air travel.

    Eagle feeds you the wires in the order they were drawn ... you can expect 60 to 80% optimization by running your generated PCB gcode through the optimizer.

  18. #18
    Join Date
    Sep 2006
    Posts
    218
    Quote Originally Posted by Jay C View Post
    Just so you know, the code uses the output from the PCB-Gcode ulp. It simply rearranges the lines and paths so that when they are cut it reduces the air travel.
    This is the reason why can be implemented in Eagle ulp.

    Quote Originally Posted by Jay C View Post
    Eagle feeds you the wires in the order they were drawn ... you can expect 60 to 80% optimization by running your generated PCB gcode through the optimizer.
    I get machining time with 2-10% lower than unoptimised code; and this because only G00 is optimised, when machime is fast anyway.
    But this is all that can be done.

Similar Threads

  1. Cutting optimizer
    By kurt5 in forum Uncategorised CAM Discussion
    Replies: 5
    Last Post: 12-16-2022, 09:38 AM
  2. Optimizer for PCB-Gcode
    By Jay C in forum PCB milling
    Replies: 26
    Last Post: 08-31-2008, 07:08 PM
  3. Replies: 4
    Last Post: 05-06-2007, 02:56 AM
  4. Replies: 0
    Last Post: 03-10-2005, 07:46 PM
  5. Windows XP or Windows 2000 better with Mach2
    By Beezer in forum Mach Software (ArtSoft software)
    Replies: 2
    Last Post: 10-18-2004, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •