Improvements to work with Marlin#366
Conversation
Allow disabling of tool control commands
There was a problem hiding this comment.
Good stuff!
Would you like to try running ./integration_tests.py and then ./integration_tests.py --fix --add? It runs a bunch of tests and creates new expected outputs. Those can useful show the coverage of the code and guide you in making new test cases.
If you don't want to do it, I can do it and update this PR.
The steps to do it are in the .travis.yaml file. You can also click on the TravisCI link and see the log of the continuous integration testing.
It may require installing a different version of boost or gerbv if it isn't working for you. An easier way might be to just download https://api.travis-ci.org/v3/job/612815074/log.txt and run it with patch, which will modify all the expected files as needed. And we can look at those and see if pcb2gcode is still doing the right thing.
Thanks again!
|
|
||
| // Pull the drillbit out of the workpiece | ||
| of << "G1 Z0" | ||
| << " F" << driller->feed * cfactor << '\n'; |
There was a problem hiding this comment.
As I understand, this code will cause the CNC to backout of the drilled hole first slowly and then quickly, right?
However, the G81 gcode always just backs out quickly. So maybe you can delete these two lines?
https://www.cnccookbook.com/g81-g73-g83-drill-peck-canned-cycle/
There was a problem hiding this comment.
I believe you are correct, but I am not a machinist. My understanding is the more advanced machines have such commands. Everything I've worked with is all G0 / G1. I don't think this is inherently bad, but what it really comes down to is I have no "real" machines to test something like a G81 cycle with.
| of << "G0 Z" << cutter->zsafe * cfactor << "\n\n"; | ||
|
|
||
| // Pull mill out of workpiece | ||
| of << "G1 Z0 F" << cutter->vertfeed * cfactor << '\n'; |
| // Start one step above Z0 for optimal entry | ||
| of << "G1 Z" << -1.0/stepcount * cutter->zwork * cfactor | ||
| << " F" << cutter->vertfeed * cfactor << '\n'; | ||
| << " F" << cutter->g0_horizontal_speed * cfactor << '\n'; |
There was a problem hiding this comment.
This should be remain vertfeed, no? Why this change?
I noticed that the code is "G1" but the variable is called "g0".
There was a problem hiding this comment.
I think this is moving down from zsafe to the top of the work piece. In my mind this motion can be as fast as possible since no cutting should occur. Maybe I'm wrong about this, I'll change it back. The time difference for most simple cartesian setups is only going to be milliseconds anyways
| of << "G0 Z" << cutter->zsafe * cfactor << "\n\n"; | ||
|
|
||
| // Pull mill out of the workpiece | ||
| of << "G1 Z0 F" << cutter->vertfeed * cfactor << '\n'; |
There was a problem hiding this comment.
Again, can we delete these two lines?
| gcode_end << "G53 "; | ||
| } | ||
|
|
||
| gcode_end << "G0 Z" << target->zchange * cfactor; |
There was a problem hiding this comment.
Did we already compute zchange above? So we shouldn't need target->zchange * cfactor again, right?
There was a problem hiding this comment.
You're correct, this can be eliminated now.
| /******************************************************************************/ | ||
| class Driller: public Mill | ||
| { | ||
| { |
There was a problem hiding this comment.
No need for this change, right?
If at all, I'd have put { } on the end of line 99.
| size_t path_finding_limit; | ||
| double g0_vertical_speed; | ||
| double g0_horizontal_speed; | ||
|
|
There was a problem hiding this comment.
Don't need the blank line here.
|
I will work on the CI & whitespace changes soon and update this PR again |
Pull Request Test Coverage Report for Build 1381
💛 - Coveralls |
a8e62e7 to
6d15f72
Compare
I've branched off of a version from Sep 25 as newer branches no longer build for me :(
A little context to this
I did some experiments with pcb2gcode and just manually edited the files (to delete things like M4) and managed to mill & drill a single sided board. It works fine.
So here are my changes
F100toG1 F100. I don't think commands likeF100are valid in the first place and the obvious intent was to setup the feed rate for the remaining commands.Note that for #1 there were options for this already, but they didn't appear to be used except for planning.
Let me know what you think of these changes and if I need to do anything more to get these merged.