This is the official documentation of IceSL printer profiles. This page specifies, in technical detail, the components (i.e., files, functions, variables, etc.) that make up a printer profile to be used in IceSL.
1. In Windows: %appdata%\IceSL 2. In Linux: $HOME/.icesl/
A printer profile has the following components:
features.lua : Printer settings (e.g., bed size, nozzle diameter)
printer.lua : G-code production functions (e.g., prime, extrude, header)
Profiles (optional) : Subsets of printing settings for specific situations (e.g., high quality printing, fast printing)
Materials (optional) : Subsets of printing settings for specific materials (e.g., PLA, ABS)
Files features.lua and printer.luamust start with the following directive 3:
3. This requirement was recalled in the beta version of IceSL.
This file specifies values for printing settings that are considered (by the profile maker) important to the printer hardware. In practice, any setting where its value is a boolean, an integer, or a float can be set in here.
Some settings are tied to an extruder or a brush, e.g.; filament_diameter_mm_0 is the diameter of the filament loaded on extruder 0, infill_extruder_1 specifies the extruder to use when printing geometry emitted on brush 1.
IceSL supports a maximum number of extruders (i.e., max_number_extruders) and a maximum number of brushes (i.e., max_number_brushes).
Individual per-brush or per-extruder values (e.g., print_perimeter_2 = true) take precedence over common values (e.g., print_perimeter = false).
Additionally, settings can be internal or not. Non internal settings can also be set through the UI (use the search bar for a quicker set). An exhaustive list of non internal printing settings is in the following link:
Some settings might be hidden in the UI depending on certain conditions (e.g., brim_distance_to_print_mm will be hidden if add_brim is false). As mentioned before, there also exist internal settings that can also be set in features.lua but not through the UI. We list them here:
extruder_count : Number of extruders installed on the printer(integer)
priming_mm_per_sec : Speed for prime/retract (mm/sec) (float)
extruder_swap_at_location : Go to a specific location to swap extruders (true/false)
extruder_swap_location_x_mm : Location to swap extruders, X coordinate (float)
extruder_swap_location_y_mm : Location to swap extruders, Y coordinate (float)
extruder_swap_retract_speed_mm_per_sec : Retractation speed after a swap (mm/sec) (float)
extruder_mix_count_e : Number of mixed filaments on extruder e (integer)
4. This feature only is available at the moment in the beta version of IceSL.
It is possible for user-defined printing settings to be shown and modified through the UI. Currently there is support for two types of settings; booleans and floats. The following two definitions can be used in file features.lua of a printer profile:
These add setting internal_name with description, minimum value minValue and maximum value maxValue. If non is provided, default value is false for add_checkbox_setting and minValue for add_setting:
internal_name : internal name for setting
description : description of setting (shown in UI)
minValue : minimal value in case of a number setting (i.e., add_setting)
maxValue : maximum value in case of a number setting (i.e., add_setting)
tooltip : tooltip help to show in IceSL's UI. This parameter is optional.
default : default value. This parameter is optional.
The setting's value can then be queried in file printer.lua of the printer profile by using the setting's internal_name.
This file specifies how to translate the sliced geometry to printing instructions, hereafter referred to as the G-Code file. These instructions are specific to the machine/printer the profile is made for. Moreover, the translation is done through lua functions that are called by IceSL whenever the print process demands it 5. The list of functions to implement are the following:
called to create the header of the G-Code file
called to create footer of the G-code file
called when outputting a comment c
called at the start of a layer at height z
called at the end of a layer
called before extruding
called after extruding
called when selecting the extruder ext
called when swapping extruder ext1 to ext2 at position x,y,z
called when priming from value e with extruder ext. This function must return the value of the E-axis after priming
called when retracting from value e with extruder ext. This function must return the value of the-E axis after retracting
called when moving the E-axis to value e with the current extruder
called when traveling to x,y,z
called when traveling to x,y,z while extruding to value e
called on each step of producing the gcode; percent is the total progress of the print
called when setting the feed-rate of the printer to rate
called when setting the part cooling fan velocity to speed
called when setting the extruder ext temperature to temp
called when the parameter enable_min_layer_time is set to true and the printing time for the layer is less than min_layer_time_sec. sec is the remaining time to achieve min_layer_time_sec and x,y,z is where IceSL expects the head to be after the wait
called when setting the extruder ext temperature to temp while waiting. Called when using multiple extruders
called when setting the mixing ratios of each filament feeding onto the mixing extruder; ratios is a table containing the ratio for each filament. This function is only called when using color mixing
Functions returning a value (i.e., prime and retract) are expected to be called by IceSL only6. This is due to the fact that IceSL uses the returned value to internally keep track of the E-axis. Calling them explicitly may render the E values fed to the profile functions inconsistent.
5. Though all printer profiles packaged in IceSL produce G-Code, this approach is sufficiently general to allow production of other machine languages, and by extension, to other manufacturing machines.
6. This restriction will be recalled in the future. Keeping track of the E-axis will be handled by the profile.
IceSL provides a number of lua helper functions to facilitate the writing to gcode. These function can be used in printer.lua. The following is a list detailing these functions:
returns the contents of file filename as a string
outputs error string to the console (only available in IceSL-Slicer)
converts number to string with precision of three (3) decimals
converts number to string with precision of six (6) decimals. It is recommended to use this function when outputting the quantity to extrude
converts number to string with precision of nine (9) decimals
When implementing the above lua functions, the user can access all printing settings used while slicing. Settings with boolean, integer or float values as well as custom settings defined in features.lua can be queried/polled.
Additionally, IceSL provides other useful variables that are also accessible. We detail them next:
number of extruders used in the print
table of integers
extruder ids used in the print
table of floats
filament diameter for each extruder
table of floats
filament priming for each extruder
total layers of print
current filament consumed
current (estimated) printing time in seconds
elapsed (estimated) time in seconds since start of print. Available in `layer_start' function
elapsed (estimated) time in seconds since start of print. Available in 'layer_stop' function
elapsed (estimated) time in seconds since start of layer. Available in 'layer_stop' function
Variables that specify the printing geometry also exist:
lower-left corner of geometry to be printer (X coordinate)
lower-left corner of geometry to be printer (Y coordinate)
size of geometry to be printer (X coordinate)
size of geometry to be printer (Y coordinate)
size of geometry to be printer (Z coordinate)
distance transformation from G-code view to geometry view (X coordinate)
distance transformation from G-code view to geometry view (Y coordinate)
distance transformation from G-code view to geometry view (Z coordinate)
IceSL can also discriminate the type of path being processed and its properties. For this purpose, use the following variables:
current path is a perimeter
current path is a shell
current path is an infill
current path is a brim
current path is a raft
current path is a shield
current path is a tower
current path is a support
current path is a bridge
current path is traveling
current path is a cover
current path length
current path flow multiplier
current path speed multiplier
Utility information is also available by means of variables:
G-code output file name
path to printer.lua
name of slicer used (i.e., 'IceSL')
slicer version used
build date of slicer used
As an example to tie all the concepts explained above we show the prime function of a printer profile:
These are specialized printing settings (similar to features.lua) for specific situations or materials. They are located in either profiles or materials subdirectories inside the printer profile folder.
They do not possess a naming convention but they do have to keep a .lua extension.