HowTo Add A New Infill Pattern To PrusaSlicer

The Dev-Team at Prusa has done a nice job of cleaning up the Slic3r sources with their “PrusaSlicer” fork. Also setting up a build is so much easier now.

Playing with infills is always fun. The following shows were you need to touch the sources to add a new infill pattern to libslic3r and the GUI.


create “NewFill.hpp” and “NewFill.cpp


Add “NewFill.hpp” and “NewFill.cpp” to the “addLibrary” call.


Include “NewFill.hpp” and add “case ipNewfill: return new FillSinusoidal();” to the “Fill::new_from_type” function.


Add to the “fill_pattern” enum at around line 830


def->enum_labels.push_back(L(“New Fill”));


Extend “enum InfillPattern” with “ipNewfill” and the “get_enum_values()” function with “keys_map[“newfill”] = ipNewfill;”