Simple G-Code Generator

More
06 May 2017 10:15 #92737 by Erik
Simple G-Code Generator was created by Erik
Hello everybody,

based on the python scripts in the wiki (wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple...NC_G-Code_Generators) I wrote a framework for small python g-code generators (for milling):
Download and screen-shots here

Currently (v3.3.0) it supports the following generators for milling:
  • Outlining: Rectangle, Circle, Arc, Ellipse, Polygon
  • Pocketing: Rectangle, Circle, Arc, Slot
  • Drill: Matrix, Grill
  • Engraving: Bezel, Text (all qcad fonts are now usable)
Other features:
  • Save, load and insert projects.
  • Edit values and order of generated objects (see above).
  • Remote control of AXIS to load the generated g-code.
  • Easy to add other generators or modify existing ones (at least this was the goal).

It is meant for hobbyist use only, so please do not expect the perfect path generation.
So this is my small contribution.....if anyone is interested to optimise, debug, add generator features, please let me know and I will write a short how-to. Any feedback is very appreciated!

Best regards
Erik
The following user(s) said Thank You: TurBoss

Please Log in or Create an account to join the conversation.

More
08 May 2017 12:11 #92812 by BigJohnT
Replied by BigJohnT on topic Simple G-Code Generator
When I try and run it on LinuxMint 17.3 I get this error (I think it is an error)
: No such file or directory
JT
The following user(s) said Thank You: Erik

Please Log in or Create an account to join the conversation.

More
08 May 2017 14:06 - 08 May 2017 15:00 #92817 by Erik
Replied by Erik on topic Simple G-Code Generator
Thanks for your feedback!
I was able to reproduce it: It is an issue with the encoding (end of line). Running dos2unix solved it. Still do not know how this happened. The configuration of the editor that I use seems fine.
Update on the way...
Erik
Last edit: 08 May 2017 15:00 by Erik.

Please Log in or Create an account to join the conversation.

More
08 May 2017 14:25 #92819 by BigJohnT
Replied by BigJohnT on topic Simple G-Code Generator
In windoze I use NotePad++, in Linux almost any text editor is fine.

JT

Please Log in or Create an account to join the conversation.

More
08 May 2017 14:59 #92823 by Erik
Replied by Erik on topic Simple G-Code Generator
Updated version 3.3.1 is available.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
08 May 2017 23:35 #92885 by tommylight
Replied by tommylight on topic Simple G-Code Generator
Works as it should. Thank you.
The following user(s) said Thank You: Erik

Please Log in or Create an account to join the conversation.

More
09 May 2017 10:24 #92903 by BigJohnT
Replied by BigJohnT on topic Simple G-Code Generator
I saved the file with linux line endings and it ran but I got a segmentation fault when editing a rectangle pocket. Same thing with 3.3.1.

You might add the option to set the default units and plane.

JT
The following user(s) said Thank You: Erik

Please Log in or Create an account to join the conversation.

More
09 May 2017 13:55 #92926 by Erik
Replied by Erik on topic Simple G-Code Generator
I think I fixed the segmentation fault issue. There were mandatory parameter checks (avoid endless loops) missing in three classes.

Version 3.3.2. is now available.

I am not sure if I understood your suggestion. Default units and plane for each object, or overall? For overall I got the preamble (custom code). I guess the metric default values are an issue, right? They can be edited in the code in the file <nclasses> class <Basedata>.

Found another issue on my LinuxCNC controller. I do not get axis-remote working from within the script when started stand-alone (the button <Save & LCNC Load> should be activated if LCNC is running.

Erik

Please Log in or Create an account to join the conversation.

More
10 May 2017 23:29 #92999 by BigJohnT
Replied by BigJohnT on topic Simple G-Code Generator
Aye a check box for units and plane would be nice. So you don't have to edit it each time.

JT

Please Log in or Create an account to join the conversation.

More
11 May 2017 17:31 #93036 by Erik
Replied by Erik on topic Simple G-Code Generator
I assume setting the units is only needed once. At the moment there are two ways possible:
1. edit the default preamble in the code <sgg.py> or...
2. put a g-code file named <preamble.ngc> into the directory of the script. This will be loaded as the default. Same works for the postamble.

Setting the plane makes sense for each object. Unfortunately the object classes are not written with this in mind. I will have a look on that...

Erik

Please Log in or Create an account to join the conversation.

Moderators: Skullworks
Time to create page: 0.690 seconds
Powered by Kunena Forum