gcode_reader.read¶
Functions¶
|
Translates a dictionary of G-code words into abstract command concepts. |
|
Reads a G-code file into a set of clean dictionaries of words |
|
Reads a G-code line into a clean dictionary of words and comments |
Module Contents¶
- gcode_reader.read.apply_word_abstractions(word_map: dict, words: dict) dict[source]¶
Translates a dictionary of G-code words into abstract command concepts.
Uses a word map to reverse-map concrete G-code words (e.g., ‘X’, ‘F’) into their abstract representations (e.g., ‘location’, ‘feed_rate’). Modifies words in-place by adding the abstract keys, then returns it.
- gcode_reader.read.read_gcode_file(filepath: str, flavor: str = 'default', encoding='utf-8')[source]¶
Reads a G-code file into a set of clean dictionaries of words