... | ... | @@ -2,7 +2,20 @@ |
|
|
|
|
|
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.
|
|
|
|
|
|
## Location & Creation
|
|
|
1. [Location & Creation](#location)
|
|
|
1. [Components](#components)
|
|
|
|
|
|
2. [Features.lua](#features_lua)
|
|
|
1. [Custom Settings](#custom)
|
|
|
|
|
|
3. [Printer.lua](#printer_lua)
|
|
|
1. [Helper Functions](#helpers)
|
|
|
2. [State Variables](#variables)
|
|
|
3. [Example](#example)
|
|
|
|
|
|
4. [Material and Profiles](#materials)
|
|
|
|
|
|
## Location & Creation <a name="location"></a>
|
|
|
|
|
|
Printer profiles are located inside IceSL's asset folder<sup>1,2</sup>; Click on *File* → *Open assets folder* and from here navigate to the subdirectory ```icesl-printers/fff```.
|
|
|
|
... | ... | @@ -11,7 +24,7 @@ Each folder inside ```icesl-printers/fff``` is processed by IceSL as a single pr |
|
|
<sup>1. In Windows: ```%appdata%\IceSL```</sup> <br>
|
|
|
<sup>2. In Linux: ```$HOME/.icesl/```</sup>
|
|
|
|
|
|
### Components
|
|
|
### Components <a name="components"></a>
|
|
|
|
|
|
A printer profile has the following components:
|
|
|
|
... | ... | @@ -28,7 +41,7 @@ version = 2 |
|
|
|
|
|
<sub>3. This requirement will be recalled in the future</sub>
|
|
|
|
|
|
## ```Features.lua```
|
|
|
## ```Features.lua``` <a name="features_lua"></a>
|
|
|
|
|
|
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.
|
|
|
|
... | ... | @@ -68,7 +81,7 @@ Some settings might be hidden in the UI depending on certain conditions (e.g., ` |
|
|
* ```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)
|
|
|
|
|
|
### Custom settings
|
|
|
### Custom settings <a name="custom"></a>
|
|
|
|
|
|
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:
|
|
|
|
... | ... | @@ -86,7 +99,7 @@ These add setting ```internal_name``` with ```description```, minimum value ```m |
|
|
|
|
|
The setting's value can then be queried in file ```printer.lua``` of the printer profile by using the setting's ```internal_name```.
|
|
|
|
|
|
## ```Printer.lua```
|
|
|
## ```Printer.lua``` <a name="printer_lua"></a>
|
|
|
|
|
|
This file specifies how the profile produces g-code that is specific to the printer. This is done through lua functions that are called by IceSL whenever the print process demands it. The list of functions to implement are the following:
|
|
|
|
... | ... | @@ -101,11 +114,11 @@ This file specifies how the profile produces g-code that is specific to the prin |
|
|
| ```extruder_stop()``` | called after extruding |
|
|
|
| ```select_extruder(ext)``` | called when selecting the extruder ```ext``` |
|
|
|
| ```swap_extruder(ext1,ext2,x,y,z)``` | called when swapping extruder ```ext1``` to ```ext2``` at position ```x,y,z``` |
|
|
|
| ```prime(ext,e)``` | called when priming quantity ```e``` with extruder ```ext``` |
|
|
|
| ```retract(ext,e)``` | called when retracting quantity ```e``` with extruder ```ext``` |
|
|
|
| ```move_e(e)``` | called when extruding quantity ```e``` with current extruder |
|
|
|
| ```prime(ext,e)``` | called when priming from value ```e``` with extruder ```ext```. This function must return the value of the E-axis after priming |
|
|
|
| ```retract(ext,e)``` | called when retracting from value ```e``` with extruder ```ext```. This function must return the value of the-E axis after retracting |
|
|
|
| ```move_e(e)``` | called when moving the E-axis to value ```e``` with the current extruder |
|
|
|
| ```move_xyz(x,y,z)``` | called when traveling to ```x,y,z``` |
|
|
|
| ```move_xyze(x,y,z,e)``` | called when traveling to ```x,y,z``` while extruding ```e``` |
|
|
|
| ```move_xyze(x,y,z,e)``` | called when traveling to ```x,y,z``` while extruding to value ```e``` |
|
|
|
| ```progress(percent)``` | called on each step of producing the gcode; ```percent``` is the total progress of the print |
|
|
|
| ```set_feedrate(rate)``` | called when setting the feed-rate of the printer to ```rate``` |
|
|
|
| ```set_fan_speed(speed)``` | called when setting the part cooling fan velocity to ```speed``` |
|
... | ... | @@ -113,7 +126,7 @@ This file specifies how the profile produces g-code that is specific to the prin |
|
|
| ```set_and_wait_extruder_temperature(ext,temp)``` | called when setting the extruder ```ext``` temperature to ```temp``` while waiting |
|
|
|
| ```set_mixing_ratios(ratios)``` | 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 |
|
|
|
|
|
|
### Helper functions
|
|
|
### Helper functions <a name="helpers"></a>
|
|
|
|
|
|
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:
|
|
|
|
... | ... | @@ -122,10 +135,10 @@ IceSL provides a number of lua helper functions to facilitate the writing to gco |
|
|
| ```file(filename)``` | returns the contents of file ```filename``` as a string |
|
|
|
| ```error(string)``` | outputs error ```string``` to the console (only available in IceSL-Slicer) |
|
|
|
| ```f(number)``` | converts ```number``` to string with precision of three (3) decimals |
|
|
|
| ```ff(number)``` | converts ```number``` to string with precision of six (6) decimals |
|
|
|
| ```fff(number)``` | converts ```number``` to string with precision of nine (9) decimals. It is recommended to use this function when outputting the quantity to extrude |
|
|
|
| ```ff(number)``` | converts ```number``` to string with precision of six (6) decimals. It is recommended to use this function when outputting the quantity to extrude |
|
|
|
| ```fff(number)``` | converts ```number``` to string with precision of nine (9) decimals |
|
|
|
|
|
|
### State variables
|
|
|
### State variables <a name="variables"></a>
|
|
|
|
|
|
When implementing the lua functions for G-code production, 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.
|
|
|
|
... | ... | @@ -155,7 +168,24 @@ Variables that specify the printing geometry also exist: |
|
|
| ```gcode_to_model_y``` | float | distance transformation from G-code view to geometry view (Y coordinate) |
|
|
|
| ```gcode_to_model_z``` | float | 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 use the following variables:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
|
| ------ | ------ | ------ |
|
|
|
| ```path_is_perimeter``` | Boolean | current path is a perimeter |
|
|
|
| ```path_is_shell``` | Boolean | current path is a shell |
|
|
|
| ```path_is_infill``` | Boolean | current path is an infill |
|
|
|
| ```path_is_brim``` | Boolean | current path is a brim |
|
|
|
| ```path_is_raft``` | Boolean | current path is a raft |
|
|
|
| ```path_is_shield``` | Boolean | current path is a shield |
|
|
|
| ```path_is_tower``` | Boolean | current path is a tower |
|
|
|
| ```path_is_support``` | Boolean | current path is a support |
|
|
|
| ```path_is_bridge``` | Boolean | current path is a bridge |
|
|
|
| ```path_is_travel``` | Boolean | current path is traveling |
|
|
|
| ```path_is_cover``` | Boolean | current path is a cover |
|
|
|
| ```path_length``` | float | current path length |
|
|
|
| ```path_flow_multiplier``` | float | current path flow multiplier |
|
|
|
| ```path_speed_multiplier``` | float | current path speed multiplier |
|
|
|
|
|
|
Utility information is also available by means of variables:
|
|
|
|
... | ... | @@ -168,7 +198,20 @@ Utility information is also available by means of variables: |
|
|
| ```slicer_version``` | string | slicer version used |
|
|
|
| ```slicer_build_date``` | string | build date of slicer used |
|
|
|
|
|
|
## Material and Profiles
|
|
|
### Example <a name="example"></a>
|
|
|
|
|
|
As an example to tie all the concepts explained above we show the prime function of a printer profile:
|
|
|
|
|
|
```lua
|
|
|
function prime(extruder,e)
|
|
|
len = filament_priming_mm[extruder]
|
|
|
speed = priming_mm_per_sec * 60;
|
|
|
output('G1 F' .. f(speed) .. ' ' .. 'E' .. ff(e + len))
|
|
|
return e + len
|
|
|
end
|
|
|
```
|
|
|
|
|
|
## Material and Profiles <a name="profiles"></a>
|
|
|
|
|
|
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.
|
|
|
|
... | ... | |