CAM: respect SHOW_OPERATION_LABELS in post-operation information

This commit is contained in:
jffmichi
2025-05-07 04:55:03 +02:00
parent 1e87d8e668
commit f4d853e5dc
5 changed files with 56 additions and 52 deletions

View File

@@ -154,9 +154,12 @@ def output_postop(values: Values, gcode: Gcode, obj) -> None:
nl: str = "\n"
if values["OUTPUT_COMMENTS"]:
comment = PostUtilsParse.create_comment(
values, f'{values["FINISH_LABEL"]} operation: {obj.Label}'
)
if values["SHOW_OPERATION_LABELS"]:
comment = PostUtilsParse.create_comment(
values, f'{values["FINISH_LABEL"]} operation: {obj.Label}'
)
else:
comment = PostUtilsParse.create_comment(values, f'{values["FINISH_LABEL"]} operation')
gcode.append(f"{PostUtilsParse.linenumber(values)}{comment}{nl}")
for line in values["POST_OPERATION"].splitlines(False):
gcode.append(f"{PostUtilsParse.linenumber(values)}{line}{nl}")