CAM: Fix postprocessors Help arguments --postamble and --preamble (#20792)
This commit is contained in:
@@ -56,11 +56,11 @@ parser.add_argument(
|
||||
parser.add_argument("--precision", default="3", help="number of digits of precision, default=3")
|
||||
parser.add_argument(
|
||||
"--preamble",
|
||||
help='set commands to be issued before the first command, default="G17 G54 G40 G49 G80 G90"',
|
||||
help='set commands to be issued before the first command, default="G17 G54 G40 G49 G80 G90\\n"',
|
||||
)
|
||||
parser.add_argument(
|
||||
"--postamble",
|
||||
help='set commands to be issued after the last command, default="M05\\nG17 G54 G90 G80 G40\\nM2"',
|
||||
help='set commands to be issued after the last command, default="M05\\nG17 G54 G90 G80 G40\\nM2\\n"',
|
||||
)
|
||||
parser.add_argument(
|
||||
"--inches", action="store_true", help="Convert output for US imperial mode (G20)"
|
||||
@@ -196,7 +196,7 @@ def export(objectslist, filename, argstring):
|
||||
# Write the preamble
|
||||
if OUTPUT_COMMENTS:
|
||||
gcode += linenumber() + "(begin preamble)\n"
|
||||
for line in PREAMBLE.splitlines(False):
|
||||
for line in PREAMBLE.splitlines():
|
||||
gcode += linenumber() + line + "\n"
|
||||
gcode += linenumber() + UNITS + "\n"
|
||||
|
||||
@@ -252,8 +252,8 @@ def export(objectslist, filename, argstring):
|
||||
# do the post_amble
|
||||
if OUTPUT_COMMENTS:
|
||||
gcode += "(begin postamble)\n"
|
||||
for line in POSTAMBLE.splitlines(True):
|
||||
gcode += linenumber() + line
|
||||
for line in POSTAMBLE.splitlines():
|
||||
gcode += linenumber() + line + "\n"
|
||||
|
||||
if FreeCAD.GuiUp and SHOW_EDITOR:
|
||||
final = gcode
|
||||
|
||||
Reference in New Issue
Block a user