Crates.io | gcode-nom |
lib.rs | gcode-nom |
version | |
source | src |
created_at | 2024-12-26 11:53:56.741491+00 |
updated_at | 2025-03-31 17:11:27.008512+00 |
description | Visualization tool for inspecting a g-code file. |
homepage | https://github.com/martinfrances107/gcode-nom |
repository | https://github.com/martinfrances107/gcode-nom |
max_upload_size | |
id | 1495589 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Rust 2021 Edition.
A library containing a full set of nom parsers for decoding gcode files.
Both .gcode files and binary .bgcode files are recognized.
Based on this library the workspace contains a series of visualization tools
I intend the parsers to be as strictly compliant as possible. This is under-going rapid development. Please create issues here, or send me gcode files which expose unimplemented sections.
See nom - "A byte-oriented, zero-copy, parser combinator library"
Between version 0.4 and 0.5 a major performance misconception was unpicked.
A 9.9MByte file is processed 60 times faster. Now in 1.3secs
[ See the assets folder associated with this repository "gear-holder-print-in-place_04n_022mm_pla_mk4_6h49m.bgcode" ]
Generates obj files.
Pass the gcode file into StdIn - the obj file is sent to StdOut :-
cd gcode2obj
cargo run --release -- < ./assets/benchy.gcode > benchy.obj
If a filename is passed in as a command line parameter then a obj file will be dumped to StdOut.
cd gocode2obj
cargo run --release -- ../assets/X\ 6x6_0.15mm_PLA_MK3S_1h55m.gcode > X.obj
Which for example can be imported into blender for visualization.
Within blender :-
Generate svg files
Pass the gcode file into StdIn - the SVG file is sent to StdOut :-
cd gcode2svg
cargo run --release -- < ./assets/benchy.gcode > benchy.svg
If a filename is passed in as a command line parameter then a svg file will be dumped to StdOut.
cd gocode2svg
cargo run --release -- ../assets/X\ 6x6_0.15mm_PLA_MK3S_1h55m.gcode > X.svg
Iterates over all the embedded thumbnail block and save the images to disk
cargo run --release -- ../assets/both\ parts.bgcode
Strict checking of binaries. validates blocks checksums, ensures 'block' parameters values are within valid ranges.
Pass the gcode file into StdIn - A summary file is written to StdOut
cd bgcodeViewer
cargo run --release < ../assets/both\ parts.bgcode > summary.txt
see TODO
A Bevy app?