Skip to content

jothepro43/S4_Slicer

 
 

Repository files navigation

S4 Slicer

A generic non-planar slicer, that can print almost any part without support.

Please use the dicussions tab to ask questions and help others.

Try it now on Google Colab! (note: colab free tier is only powerful enough to slice very simple models)

Watch the video

Check out my YouTube video for more details!

Thank you to JLCCNC for helping create the extruder mount and build plate for my 4 Axis Core R-Theta Printer.

Native C++ path gradient prototype

The original slicer prototype is implemented in Python within main.ipynb. For workloads that are dominated by the calculate_path_length_to_base_gradient routine we now ship a standalone, optimised C++ rewrite in cpp/rotation_optimizer.cpp. The implementation keeps the same inputs as the notebook version (cell centres, neighbourhood lists, face normals, etc.) and performs multi-source Dijkstra, plane fitting and optional smoothing using cache-friendly data structures.

Build and run the self-contained example with:

g++ -std=c++17 -O3 cpp/rotation_optimizer.cpp cpp/example.cpp -o path_gradient
./path_gradient

The program prints the per-cell gradient, the computed distance to the nearest bottom cell and the index of that cell, allowing easy verification against the Python workflow. The implementation can be embedded in other tools or wrapped with Python bindings for tight integration with the existing notebook pipeline.

Bibtex Citation:

@software{Bird_S4_Slicer,
author = {Bird, Joshua},
license = {GPL-3.0},
title = {{S4 Slicer}},
url = {https://github.com/jyjblrd/S4_Slicer}
}

About

Generic Non-Planar Slicer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • G-code 85.4%
  • Jupyter Notebook 14.5%
  • C++ 0.1%