Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 94117d3

Browse files
author
Greg Turner
committed
Command line is written to gcode. Good to plot!
1 parent 4675387 commit 94117d3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

settings/eleksmaker_a3.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
# Configuration file for SVG to GCODE converter
4-
# For printing single layers with adhesive
1+
import os
2+
3+
_settings_file = os.path.basename(__file__)
4+
settings_name = f'Eleksmaker A3 ({_settings_file})'
55

66
# A4 area: 210mm x 297mm
77
# Printer Cutting Area: ~178mm x ~344mm
@@ -26,7 +26,7 @@
2626
shape_postamble = ""
2727

2828
# G-code prepended at the start of processing the SVG file
29-
preamble = """; For EleksMaker A3 Plotter
29+
preamble = f"""; Settings: {settings_name}
3030
G21 ;metric values
3131
G90 ;absolute positioning
3232
"""

svg2gcode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self, filename, settings):
3838
'''Open the file and write the preamble'''
3939
self.settings = settings
4040
self.file = open(filename, 'w')
41+
self.writeln(f'; Generated with `{" ".join(sys.argv)}`')
4142
self.writeln(self.settings.preamble)
4243
self.writeln(f'G01 F{self.settings.feed_rate}')
4344

0 commit comments

Comments
 (0)