GRBL new post processor with drill cycles G81..G83

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: GRBL new post processor with drill cycles G81..G83

Post by freman »

No need to hack the source files, you can set it in the Job Edit dialogue, where you set the post processor to use :
Attachments
grbl-opts.png
grbl-opts.png (36.7 KiB) Viewed 3287 times
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: GRBL new post processor with drill cycles G81..G83

Post by tigermm »

Oh awesome, that's even better!
Thanks.

Is there a list of arguments and their functions somewhere?
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: GRBL new post processor with drill cycles G81..G83

Post by freman »

For a list, read where it is defined in grbl_post.py

I think most are fairly self explanatory. I don't know of any doc, but that would not mean there isn't any.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: GRBL new post processor with drill cycles G81..G83

Post by tigermm »

Gotcha, cheers.

I'm no programmer so I've no idea how the translation from "TRANSLATE_DRILL_CYCLES = True" to "--translate_drill" comes about.

If you have the time and inclination to explain, that'd be cool. If not, then I'll just accept it and move on. :D
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: GRBL new post processor with drill cycles G81..G83

Post by freman »

Code: Select all

 
# Parser arguments list & definition
parser = argparse.ArgumentParser(prog='grbl', add_help=False)
parser.add_argument('--comments',           action='store_true', help='output comment (default)')
parser.add_argument('--no-comments',        action='store_true', help='suppress comment output')
parser.add_argument('--header',             action='store_true', help='output headers (default)')
parser.add_argument('--no-header',          action='store_true', help='suppress header output')
parser.add_argument('--line-numbers',       action='store_true', help='prefix with line numbers')
parser.add_argument('--no-line-numbers',    action='store_true', help='don\'t prefix with line numbers (default)')
parser.add_argument('--show-editor',        action='store_true', help='pop up editor before writing output (default)')
parser.add_argument('--no-show-editor',     action='store_true', help='don\'t pop up editor before writing output')
parser.add_argument('--precision',          default='3',         help='number of digits of precision, default=3')
parser.add_argument('--translate_drill',    action='store_true', help='translate drill cycles G81, G82 & G83 in G0/G1 movements')
parser.add_argument('--no-translate_drill', action='store_true', help='don\'t translate drill cycles G81, G82 & G83 in G0/G1 movements (default)')
parser.add_argument('--preamble',                                help='set commands to be issued before the first command, default="G17 G90"')
parser.add_argument('--postamble',                               help='set commands to be issued after the last command, default="M5\nG17 G90\n;M2"')
parser.add_argument('--inches',             action='store_true', help='Convert output for US imperial mode (G20)')
parser.add_argument('--tool-change',        action='store_true', help='Insert M6 for all tool changes')
parser.add_argument('--wait-for-spindle',   type=int, default=0, help='Wait for spindle to reach desired speed after M3 / M4, default=0')
parser.add_argument('--return-to',          default='',          help='Move to the specified coordinates at the end, e.g. --return-to=0,0')
parser.add_argument('--bcnc',               action='store_true', help='Add Job operations as bCNC block headers. Consider suppressing existing comments: Add arg>
parser.add_argument('--no-bcnc',            action='store_true', help='suppress bCNC block header output (default)')
TOOLTIP_ARGS = parser.format_help()
That all pops up as a hover hint if you mouse over the input edit in Job Edit dlg. and hover for a second.
You get the actual option arguments that you can type in with a brief explanation of what they do and what the default state is.

If you click to put the text cursor in input box it does not show unless move the mouse a little and hover after clicking. If you hover without clicking you get it. At least that is what my Linux UI does. If it popped up when you click to type, I guess it would get in the way.

Anyway , that's probably what you wanted to know.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: GRBL new post processor with drill cycles G81..G83

Post by tigermm »

Yup, that's exactly what I was after.
Thanks once again :D
chrisb
Veteran
Posts: 53928
Joined: Tue Mar 17, 2015 9:14 am

Re: GRBL new post processor with drill cycles G81..G83

Post by chrisb »

Without going into the code you can go over the input field and the help text popping up shows the parameters.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: GRBL new post processor with drill cycles G81..G83

Post by tigermm »

For me it doesn't




OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25645 (Git)
Build type: Release
Branch: master
Hash: 37d9757399b4c2ec30318eb88d7cd7c508246345
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/New Zealand (en_NZ)
Attachments
New Bitmap Image.jpg
New Bitmap Image.jpg (115.74 KiB) Viewed 3006 times
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: GRBL new post processor with drill cycles G81..G83

Post by freman »

No, I said the Job Edit dialogue, not preferences. Look at the screen shot here:

https://forum.freecadweb.org/viewtopic. ... 87#p542028

Hover on where you see "Arguments" input box where you can type in --translate_drill or other option arguments.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: GRBL new post processor with drill cycles G81..G83

Post by tigermm »

Ah you mean here...........
That works.
Would be great to have the same popup in the preferences area to be able to set it as a default, rather than a job by job basis.
I guess if all the arguments you want are in there then you save that as your template that works too.

EDIT: It seems that what's in your template overwrites what's in your preferences anyway eg output file name and location.

Thanks again for the help everyone.
Attachments
New Bitmap Image.jpg
New Bitmap Image.jpg (167.78 KiB) Viewed 2985 times
Post Reply