#gcode #parser-combinator #wavefront-obj #nom

app gcode2obj

[Wavefront obj] Visualization tool for inspecting a g-code file

2 releases

0.1.1 Dec 27, 2024
0.1.0 Dec 26, 2024

#286 in Visualization

Download history 288/week @ 2024-12-25

288 downloads per month

MIT license

3.5MB
1.5K SLoC

gcodeToObj

Rust 2021 Edition.

crates.io Documentation

A G-code visualization tool written in rust

A nom based parser, outputs a "Wavefront Obj" file which can be imported into blender and a Bevy app for visualization

How to use

Pass the gcode file in as 'StdIn' and the program will send the obj file to 'StdOut' :-

cargo run --release -- < ../assets/bency.gcode > benchy.obj

Which for example can be imported into blender for visualization.

Benchy in Blender Lego bricks

Within blender :-

  1. This obj has been "Imported".
  2. Converted into a "Curve".
  3. Finally a circular bevel object has been applied to make the object solid [ A circle to represent a 0.1mm fibre].

see todo

Future work

  • As the gcode-nom library developes we could handle binary-gcode files.

  • I have only tested against gcode files that use absolute positioning. I must test will relative positioning.

Dependencies