Skip to content

Conversation

@kylegrover
Copy link

@kylegrover kylegrover commented Nov 18, 2025

This is a very lightweight mode that eschews all of the volume conservation math to instead do a simple 'capsule' or rounded capped cylinder of size nozzle_diameter for each extruded segment. It can be triggered with preview_mode: true or by passing a --preview flag. The idea is you would run this before doing your full simulation to get a preview of how it will look.

Also included: STL mesh generation speedup with numpy vectorization.

This branch was built on top of my optimizations branch, recommend to either merge after that one or to rebase/cherry pick the last 3 commits from this one.

image
$ uv run python volco.py --gcode="examples/gcode_example.gcode" --sim=examples/simulation_settings.json --printer=examples/printer_settings.json --preview
INFO 2025-11-17 20:08:43,967 Processing .gcode ...
INFO 2025-11-17 20:08:43,967 Done processing .gcode!
Number of printed filaments: 4
INFO 2025-11-17 20:08:43,967 Preallocating voxel space z-dimension: base=13, extra=8, safety=2, final=23
INFO 2025-11-17 20:08:43,972 [Mesh]: Using optimized box representation      
INFO 2025-11-17 20:08:44,032 [Mesh]: Exporting STL in binary format to path C:\Users\kyle\projects\gcode\volco\Results_volco\Test_volco.stl...
INFO 2025-11-17 20:08:44,035 [Mesh]: STL exported in binary format!

Total simulation time: 0.07 seconds

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