FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add `global_index` property for creating unique line numbers by yeu-degroot · Pull Request #38 · plottertools/vpype-gcode · GitHub

Add global_index property for creating unique line numbers - #38

Open
yeu-degroot wants to merge 2 commits into
plottertools:mainfrom
yeu-degroot:add-global-index
Open

Add global_index property for creating unique line numbers#38
yeu-degroot wants to merge 2 commits into
plottertools:mainfrom
yeu-degroot:add-global-index

Conversation

Copy link
Copy Markdown

This PR adds two new properties which allow you to add unique line numbers to the outputted content:

  • global_index
  • global_index1

Example usage:

[gwrite.line_numbers]
document_start = """
N{global_index1:03d}0 (document_start)
N{global_index1:03d}1 (document_start, inserted line by the config)
"""
layer_join = "N{global_index1:03d}0 (layer_join)\n"
segment_first = "N{global_index1:03d}0 (segment_first)\n"
segment = "N{global_index1:03d}0 (segment)\n"
segment_last = "N{global_index1:03d}0 (segment_last)\n"
document_end = "N{global_index1:03d}0 (document_end)\n"

Example output:

N0010 (document_start)
N0011 (document_start, inserted line by the config)
N0020 (segment_first)
N0030 (segment)
N0040 (segment)
N0050 (segment)
N0060 (segment_last)
N0080 (segment_first)
N0090 (segment)
N0100 (segment)
N0110 (segment)
N0120 (segment_last)
N0140 (segment_first)
N0150 (segment_last)
N0170 (layer_join)
N0170 (segment_first)
N0180 (segment)
N0190 (segment)
N0200 (segment)
N0210 (segment_last)
N0230 (segment_first)
N0240 (segment_last)
N0260 (document_end)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL